
May 22nd, 2004, 03:20 PM
|
|
Registered User
|
|
Join Date: May 2004
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Can't create this table
Hey hey
I'm trying to create this table for an assignment at school but it keeps giving me the following error: ORA-00922: missing or invalid option.
Code:
CREATE TABLE Staff
(StaffID CHAR(3)
IDENTITY PRIMARY KEY,
LastName CHAR(12) NOT NULL,
FirstName CHAR(12) NOT NULL,
Position CHAR(15) NOT NULL,
Address CHAR(30) NOTNULL,
City CHAR(10) NOT NULL,
Province CHAR(2)
CHECK (Province IN ('ON','PQ'))
NOT NULL,
PostalCode CHAR(6)
CONSTRAINT PostalCode_Valid
CHECK (PostalCode LIKE '[A-Z][0-9][A-Z][0-9][A-Z][0-9]')
NOT NULL,
PhoneNumber CHAR(8)
CONSTRAINT PhoneNumber_Format
CHECK(PhoneNumber LIKE '[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]')
NOT NULL);
Can anybody help me???
Thanks in advance!!!
Cloud
Last edited by stumpy : May 23rd, 2004 at 11:54 PM.
Reason: Please place code in [code] tags, as per the forums rules
|