Skip to main content
2 of 5
added 27 characters in body; edited title
ypercubeᵀᴹ
  • 98.7k
  • 13
  • 215
  • 305

Why intended integrity constraint cannot be enforced?

What does the following integrity constraint try to enforce ? (integrity constraint is primary key in this case but i couldnt understand what should i really write )

Explain why the intended integrity constraint cannot be enforced ?

CREATE TABLE Sailors
( sid INTEGER,
  sname CHAR(10),
  rating INTEGER,
  age REAL,
  PRIMARY KEY (sid),
  CHECK
    ( (SELECT COUNT (S.sid) FROM Sailors S)
    + (SELECT COUNT (B.bid) FROM Boats B) < 100 )
) ;