469,267 Members | 972 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,267 developers. It's quick & easy.

SQLITE -> MySQL syntax differences complete list

dlite922
1,584 Expert 1GB
I'm trying to convert an SQLITE database to MySQL syntax and it seems every resource I find on google is only half complete.

I want to create this thread to sum them all up in one central location; Finally a bulleted list of all the rules you have to apply to your script to completely and fully transfer /any/ sqlite schema dump to a MySQL one.

For this I need your help; I'll start with the popular few, anyone notice any other difference, please post it in a reply. Please keep the same bulleted numbering. If you correct a mistake, note the bullet number (e.g. number 3 is wrong, should be...)


1. Replace BEGIN TRANSACTION with BEGIN;
2. Replace all double quotes " with back-ticks `
3. Remove any line that begins with "sqlite..."
4. Replace AUTOINCREMENT with AUTO_INCREMENT
5. ???


Thanks in advance for helping this resource; I'm sure many will find it useful.



Dan
Jul 6 '09 #1
1 8168
dlite922
1,584 Expert 1GB
5. Replace "shortint" with "tinyint"


Optional: Add DROP TABLE IF EXISTS or IF NOT EXISTS to table commands, based on your specific needs of course.

Optional: Ignore the "metadata" table that sqlite dump creates.



Dan
Jul 6 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Ruby Tuesday | last post: by
2 posts views Thread by aum | last post: by
3 posts views Thread by Daniel | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.