Subject Check constraint
Author Datatal AB - Gauffin, Jonas
I got a field called field1 that should only contain values named man/woman/child.
How should the constraint on the table look like?

is this correct?
create table passagerare
personnr int not null,
fornamn varchar(50) not null,
efternamn varchar(50) not null,
typ varchar(10) not null,
passning char(1) not null,
primary key(personnr) ,
CHECK (typ IN ('man', 'woman', 'child')) ,
CHECK (passning IN ('J', 'N'))

[Non-text portions of this message have been removed]