Click to See Complete Forum and Search --> : mysql syntax error


Megatron
04-17-2006, 11:52 AM
This mysql code

CREATE TABLE tblClickthroughRates(
ID int (25) NOT NULL AUTO_INCREMENT ,
rate varchar (10) ,
PRIMARY (ID)
)


is rendering this error
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(ID)
)' at line 4

why?

chazzy
04-17-2006, 11:55 AM
you don't have a column named ID in your table, you have a column named id though. MySQL is very case sensitive.

Megatron
04-17-2006, 11:59 AM
jasus, that was a quick answer!
its not the right one thou, i actually forget the "key"
:o

chazzy
04-17-2006, 12:36 PM
so it's still working with ID in capitals?
ha, that's ok, i missed the fact that you were missing the word key anyways.