Question

The Sybase manual and plenty of examples claim I can write:

   create table run_log (
     run_id        integer not null default autoincrement
   );

But Sybase 15 says there is a syntax error on the default

Was it helpful?

Solution

Sybase documentation isn't great, and it turns out there's Sybase ASA, some other product they bought, and Sybase ASE (Server Enterprise) which is what most people would think of as Sybase.

For ASE15, it's not autoincrement, it's identity, which must be on numeric, not integer

create table run_log (
  runid    numeric(12,0) identity
)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top