Showing posts with label MSSQL. Show all posts
Showing posts with label MSSQL. Show all posts

Tuesday, 18 November 2014

How to set start value of auto increment in MySQL?

The auto_increment is known as the seed value in MSSQL, if you need to change the sequence of your numbers then you can do so by running the following SQL command

ALTER TABLE tablename AUTO_INCREMENT=9999;

Change the table name to your actual table name and the 9999 to be your actual start value.

Alternatively if you are using phpMyAdmin then select your table and from the top menu select operations, under table options edit the AUTO_INCREMENT field.

This worked in phpMyAdmin version 4.2.7.1

Tuesday, 15 April 2014

MySQL migration to MSSQL

I use a mix of database servers depending on what application / project I am working on, normally it will be either SQL Server (inc Express) or MySQL.

I find working with SQL statements in SQL Server Management Studio to be much easier than creating statements on the fly, so its useful to have a copy of the MySQL databases on my MSSQL server, previously I have manually created a new database with the tables / structure that I need to create my SQL statements.

That all changed when I came across Intelligent Converters (http://www.convert-in.com/)  They have a great bit of software that will copy databases from just about anything to anything, in this case MySQL to MSSQL (http://www.convert-in.com/sql2mss.htm) The trial version of the software is limited to copying only 5 records per table, that's perfect if you just want the structure of the tables, for $49 you can have the full version of the software and for $99 you can get the MySQL Migration Toolkit which will convert any data source to or from MySQL.