Primary Key in Create as Select
684479Apr 9 2009 — edited Apr 9 2009In Oracle, how do we specify a primary key in a create as select statement? I ran a simple statement but received the ORA-00933 error. Do I have to make it two steps with table created first and do alter table to add the key?
Thanks,
CREATE TABLE Test as
SELECT
*
FROM Source a
WHERE a.sys=100
CONSTRAINT PK1 PRIMARY KEY (AccountID)