CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2012
    Posts
    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.

  2. #2
    Join Date
    Jul 2005
    Posts
    19

    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

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts



HTML5 Development Center

Click Here to Expand Forum to Full Width