question

innap9999 avatar image
innap9999 asked

need alter the table to include Identity column.

I need alter the table to include Identity column. ALTER TABLE MGMT_RPT ADD USER_ID INT IDENTITY(1, 1) AUTO_INCREMENT NOT NULL, ADD PRIMARY KEY (USER_ID) And ALTER TABLE MGMT_RPT ADD USER_ID SEQUENCE(MAX,1) NOT NULL, ADD PRIMARY KEY (USER_ID) I am getting error ORA-01735 in both cases. Please help. Thank you.
oraclealter-tableidentity-column
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KenJ avatar image KenJ commented ·
what version of Oracle are you using?
0 Likes 0 ·
innap9999 avatar image innap9999 commented ·
10g Release 10.2.0.4.0 - 64 bit Production
0 Likes 0 ·

1 Answer

·
Gazz avatar image
Gazz answered
Could you try adding the primary key as a separate ALTER (I have no idea how Oracle is different from SSMS so this may well be wrong) ALTER TABLE TEST ADD USER_ID INT IDENTITY(1,1) NOT NULL ALTER TABLE TEST ADD PRIMARY KEY (user_id)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.