Home » Developer & Programmer » Designer » Constraints /Triggers
Constraints /Triggers [message #90450] Thu, 02 October 2003 09:03 Go to next message
jinga
Messages: 116
Registered: January 2003
Senior Member
Assume there are two tables,
Table 1
unique key (3 columns composite): a, b, c
Table 2
unique key (4 columns composite): month, a, b, c

When I insert a record to table 2, the value of a, b, c must exist in table

Should I use create table with constraint, or trigger, or other ways to enforce it?
Re: Constraints /Triggers [message #90456 is a reply to message #90450] Mon, 13 October 2003 09:03 Go to previous message
Lu Xiang
Messages: 4
Registered: October 2003
Junior Member
Are you meaning foreign key constraint?

alter table Table2 add constraint fk_abc foreign key(a,b,c) references Table1(a,b,c)
Previous Topic: Question on IOT storage
Next Topic: Table sizing
Goto Forum:
  


Current Time: Thu Mar 28 07:53:42 CDT 2024