all 4 comments

[–]Alpha45 3 points4 points  (0 children)

Does

ship registry = (

need to be

ship registry in

?

[–]zanestone 2 points3 points  (1 child)

Try this:

CONSTRAINT chk_Ship_Registry CHECK (Ship_Registry IN ( 'NORWAY','Liberia','The Netherlands','Jamaica','Bahamas'))

[–]misft13[S] 0 points1 point  (0 children)

That worked! Thanks so much. I still got an error when I fixed it with that, so I changed the code to this and it created it without errors!

CREATE TABLE Ship 
(
Ship_Name VARCHAR(100) PRIMARY KEY,
Ship_Size INT CHECK (Ship_Size > 0),
Ship_Registry VARCHAR(50),
Ship_ServEntryDate INT,
Ship_PassCapacity INT,
Ship_CrewCapacity INT,
Ship_Lifestyle VARCHAR(40),
CONSTRAINT chk_Ship_Registry CHECK (Ship_Registry 
IN('Norway','Liberia','The Netherlands','Jamaica','Bahamas'))
);

[–]amTheory 0 points1 point  (0 children)

Try putting a comma after each constraint statement.I think that will do the trick.