Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Alter table

$
0
0
Hi,
I have already created a table and forgot to add in the first row.
This row should auto-increment, be unique and of type int.

I have tried using the following statements but i keep getting a syntax error.


Code:

alter table 'comp_table'
add column 'comp_id' int not null auto_increment unique first;

Code:

ALTER TABLE 'comp_table' ADD COLUMN 'comp_id' int NOT null
AUTO_INCREMENT FIRST



Can anyone tell me what i am doing wrong?

Thanks.

Viewing all articles
Browse latest Browse all 13329

Trending Articles