I am trying to create the following table but it wont create??
use [TagHolderDB]
CREATE TABLE TBLSearchTags
(
TagID int(11), --NOT NULL AUTO_INCREMENT,
Tagterm varchar(255) NOT NULL DEFAULT '',
Tagcounter int(11) NOT NULL DEFAULT '1',
TaglastSearch datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (TagID),
--KEY Tagterm (Tagterm)
) --ENGINE=TagHolderDB;
The Current error is:
Msg 2716, Level 16, State 1, Line 2 Column, parameter, or variable #1:
Cannot specify a column width on data type int.
There is also different errors when i move away the comments —
I need it all to work as i am following a tutorial, Could some one tell me what i’m doing wrong?
Errors when i remove the — comments:
Msg 102, Level 15, State 1, Line 4 Incorrect syntax near
‘AUTO_INCREMENT’.Msg 156, Level 15, State 1, Line 9 Incorrect syntax near the keyword
‘KEY’.Msg 102, Level 15, State 1, Line 10 Incorrect syntax near ‘=’.
If someone could explain to me what ENGINE does that would be great to.
Int datatype does not have length.
Try this: