SQLITE -> MySQL syntax differences complete list

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    SQLITE -> MySQL syntax differences complete list

    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
  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    #2
    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

    Comment

    Working...