Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mysql to mssql 1

Status
Not open for further replies.

dkemas

Programmer
Mar 22, 2012
70
0
0
GB
I have a database that needs moving over to mssql

I have looked around the web about data type differences and there is a lot of conflicting info, so I thought I would ask the experts here.

Looking through the database the data types used are

int(11)
longtext
text
varchar(1) to varchar(2500). majority are varchar(10)
datetime
date
tinyint(1)
tinyint(4)

My plan to move the database was to export as a sql file, find/replace the data types that need to be changed and import into mssql.

Does that sound like a good plan? Do any of the data types above need changing for mssql?

Thanks
 
all those datatypes are okay except LONGTEXT which should be TEXT

however, you must also remove the "length" from the numeric datatypes

int(11) --> int
tinyint(1) --> tinyint
tinyint(4) --> tinyint
etc.

r937.com | rudy.ca
Buy my new book Simply SQL from Amazon
 
That is great, thanks for the clarification :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top