| Author |
alter table column with auto increment fail
|
|
|
| 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
>
>
>
|
|
|
|