Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Constraint
You can't. There must be a point after which you create the team that there are
no players. Then there is one, then two, etc. And there is no known constraint
mechanism that will tell you when you have reached 12 and now allow you to enter
the 13th.
You need to look at a BEFORE INSERT trigger to stop you from entering the 13th player. And you need to reconcile yourself to how you are going to enter the first four.
Daniel Morgan
Alan Galvin wrote:
> Suppose I have 2 tables:
>
> Team[TeamID(pk), coach, rating]
> Player[PlayerID(pk), TeamID(fk)]
>
> How do create a SQL such that a team can only have between 5 and 12 players?
>
> Thanks in advance.
Received on Mon Apr 01 2002 - 10:41:41 CST
![]() |
![]() |