1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

TRIGGER: SELECT tax INTO second_DDV FROM lecure WHERE ID=:new.art_ID;

Discussion in 'General' started by monkey, Apr 25, 2014.

  1. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Hello!
    We have in tast more lectures, each lecture has its price.
    (Some lectures belong to certain topics, btw).

    We have to make a trigger which would according to the changed price (according to added tax to the lecture price!) change the whole sum of the price of the topic.

    That is why we have to create new values :new.

    All these :new values are supposed to be put in to a certain table.

    (or, I would say, column).

    What is actually happening in this row:
    SELECT tax INTO second_tax FROM lecure WHERE ID=:new.lect_ID;

    Please if someone can find appropriate link, I would be more than grateful!!!

    many thanks!


    p.s. tax is an attribute (column) in the table PRICE
     
  2. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    626
    Likes Received:
    129
    Trophy Points:
    810
    Location:
    Russian Federation
    Hi.
    Provide the table description, an example of filling with table data.

    Note : Why you exactly want to make the trigger for this operation?