Home > Archive > ASE Database forum > October 2005 > alter table column with auto increment fail









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author alter table column with auto increment fail
j

2005-10-27, 8:21 am

tablename is the name of the table and tablefieldname is the column name
that prior existed in database. But when i execute the following command, it
gives me warning "Incorret syntax near keyword DEFAULT". any idea?

alter table tablename modify tablefieldname INT DEFAULT AUTOINCREMENT NOT
NULL



mpeppler@peppler.org

2005-10-27, 8:21 am

> tablename is the name of the table and tablefieldname is
> the column name that prior existed in database. But when
> i execute the following command, it gives me warning
> "Incorret syntax near keyword DEFAULT". any idea?
>
> alter table tablename modify tablefieldname INT DEFAULT
> AUTOINCREMENT NOT NULL


Sybase doesn't understand the AUTOINCREMENT directive.
Instead you should probably use "identity" columns. Please
read the sections on identity columns in the reference
manual and the sysadmin guide.

Michael
Carl Kayser

2005-10-27, 8:21 am

Are you using ASE or ASA?

"j" <j@sybase.zcd.com> wrote in message news:434cae38@forums
-1-dub...
> tablename is the name of the table and tablefieldname is the column name
> that prior existed in database. But when i execute the following command,
> it gives me warning "Incorret syntax near keyword DEFAULT". any idea?
>
> alter table tablename modify tablefieldname INT DEFAULT AUTOINCREMENT NOT
> NULL
>
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com