Auto increment syntax error

The Sybase manual and many examples claim that I can write:

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

But Sybase 15 says there is a syntax error on default

+3
source share
1 answer

The Sybase documentation is small, and it turns out that Sybase ASA, some other product that they bought, and Sybase ASE (Server Enterprise) that most people think of Sybase.

For ASE15, this is not an auto-increment, but an identity that should be on a numeric, not an integer

create table run_log (
  runid    numeric(12,0) identity
)
+4
source

Source: https://habr.com/ru/post/1777509/


All Articles