I'm trying to create a table and add a constraint with alter table
but it's not working:
CREATE TABLE customer
(
cust_id NUMBER(3),
cust_name VARCHAR2(3),
phone_no NUMBER(10)
);
ALTER TABLE customer
ADD CONSTRAINT pk_customer
PRIMARY KEY (cust_id);
This is the error:
near "CONSTRAINT": syntax error
What did I do wrong?