What's wrong with my syntax here? I'm adhering strictly to the rules in the Sybase Reference
CREATE TABLE dashlogactions (
action_id SMALLINT NOT NULL DEFAULT IDENTITY PRIMARY KEY,
action_name VARCHAR(64) NOT NULL UNIQUE
)
SQuirrel SQL Client (version 3.3.0) is reporting an error:
Error: Incorrect syntax near the keyword 'DEFAULT'.
SQLState: ZZZZZ
ErrorCode: 156
Also SQuirrel is showing the words IDENTITY and KEY in red and when I hover over them, it says Invalid ColumnDefault
for IDENTITY and EOF expected
for KEY.
I get the same results if I replace the word IDENTITY with AUTOINCREMENT.
I'm using Sybase Adaptive Server Enterprise, although I'm not sure of the version.
You need to supply a default value if you use default. See the docs.