SourOddity
SourOddity

Reputation: 141

Invalid ALTER TABLE option ORA-01735

I'm looking to add an identity column to my existing table in oracle apex, but I am being given the invalid ALTER TABLE option error. I've been searching through a lot of threads about this error but I couldn't seem to find anything helpful for this particular problem.

ALTER TABLE tbl_Customer
ADD Customer_ID int Identity(1,1);

I'd appreciate a link to any posts that may be useful, thanks for taking a look.

Upvotes: 0

Views: 3611

Answers (1)

Littlefoot
Littlefoot

Reputation: 142713

Wrong syntax. Should be

SQL> create table tbl_customer (name varchar2(20));

Table created.

SQL> alter table tbl_customer add customer_id int generated always as identity;

Table altered.

SQL>

Besides, you are NOT using MySQL as you got ORA-01735 error (which is related to Oracle).

Upvotes: 1

Related Questions