I working with SQL Server 2008 and I have two existing tables, venues
and events
.
I am trying to create a custom function with a check constraint to make sure that the integer in the event_expected_attendance
column in the events
table is always less than or equal to the venue_max_capacity
integer in the venues
table.
I am struggling with the syntax of a custom function as well as the join statement since the check constraint is between two tables.
Thanks for the help! I will answer any additional questions quickly.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…