Simon Wistow wrote:
My app needs some databases set up. because I'm a good boy the SQL that's needed for the schemas is included with the app and there's even a command to run it for you and get everything set up.

Wünderbar.
Except, can you spot what's wrong with this SQL statement?

    CREATE TABLE IF NOT EXISTS foo (
        id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT
    );


Well, the answer is nothing. If you're using MySQL. If you're using SQLite then it's a syntax error because what you need is AUTOINCREMENT.

For no good reason that I can find.

Oh, I can find one.  You know why this is all non-standard?  Because there IS
NO STANDARD!  In all the crap they poured into the SQL "Standard" (SQL:1999
runs almost 2000 pages) they never [1] deal with the problem of incrementing
primary keys!  Not to mention the word "index" never comes up except as that
list of words at the end of the document.

God forbid they cover real SQL issues.  Oh no!  They're too busy adding
fucking XML to the language! (Not a joke, wish it were).


[1] Maybe they did in one of the newer versions of SQL, but I can't read them
because they cost a good wad of cash.  God forbid the standard be available.


--
185. My name is not a killing word.
   -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army
          http://skippyslist.com/list/

Reply via email to