|
-
February 26th, 2012, 10:58 AM
#1
creating trigger
Hey!
I have two tables as illustrated below:
people
name| #houses
------|-----------
a | 3
b | 5
c | 9
rich
name| #houses
------|-----------
w | 13
f | 19
g | 11
I need to create a trigger to insert a tuple of the people table into the rich every time the update of the people table causes someone's no. of houses to go above 10.
Please help me with the code.
-
May 10th, 2012, 01:05 AM
#2
Re: creating trigger
write a update trigger on People table.
apart from other syntaxes:
insert into rich (name,houses) values (update.name,update,houses) where update.houses>10
Let me know if it works for you.
cheers!!!
Vatsa
www.objectiveprogramming.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|