Sunday, February 19, 2012

How to Restrict

I have one table named "serving" and I want that against serving ID there
should be 42 records not more or less than that, how can I restrict that ?
Waiting for your reply
Thanks
NOOR
Use an Insert Trigger taht will do Select Count(*) from the table, and if
the number is > 42, rollback the transaction.
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"Noorali Issani" <naissani@.softhome.net> wrote in message
news:OG7VB%23xMEHA.3208@.TK2MSFTNGP10.phx.gbl...
> I have one table named "serving" and I want that against serving ID there
> should be 42 records not more or less than that, how can I restrict that ?
> Waiting for your reply
> Thanks
> NOOR
>

No comments:

Post a Comment