For want of a comma
March 1st, 2007 bymy kingdom was lost.
Watch those commas. A little SQL detail that can bite you:
SELECT SID NAME, ETC FROM MYTABLE
MySQL, and presumably other databases, is just fine with that statement. It’ll alias the field SID to NAME. If you name columns explicitly with the AS keyword, a missing comma will yield an error:
SELECT SID AS studentid <--baaarf NAME AS studentname, ETC AS studentetc FROM MYTABLE

March 2nd, 2007 at 7:54 am
Yup, I’m an Oracle DBA and have been thrown into confusion by this many times. It’s best when you’re selecting a bunch columns, trying to send the results somewhere else, and get an error about “not enough columns”, and you can’t tell why…