Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Autoincrement syntax error

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

like image 932
Dov Avatar asked Apr 08 '26 09:04

Dov


1 Answers

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
)
like image 140
Dov Avatar answered Apr 11 '26 07:04

Dov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!