1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

SQL trigger...

Discussion in 'PHP' started by shanmugappriya, Nov 25, 2011.

  1. #1
    What is the use of trigger in sql?

    How to make it...
     
    shanmugappriya, Nov 25, 2011 IP
  2. iliveforyou

    iliveforyou Active Member

    Messages:
    207
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #2
    From Microsoft site:
    A trigger is a special kind of stored procedure that automatically executes when an event occurs in the database server. DML triggers execute when a user tries to modify data through a data manipulation language (DML) event. DML events are INSERT, UPDATE, or DELETE statements on a table or view. These triggers fire when any valid event is fired, regardless of whether or not any table rows are affected.

    Here is the full text: http://msdn.microsoft.com/en-us/library/ms189799.aspx
     
    iliveforyou, Nov 25, 2011 IP
  3. 2WDH.com

    2WDH.com Active Member

    Messages:
    143
    Likes Received:
    3
    Best Answers:
    5
    Trophy Points:
    68
    #3
    Shanmugappriya,

    You've posted your question in PHP section, so most likely you are using MySQL. If yes, then it should be useful for you to read the following information:
    http://dev.mysql.com/doc/refman/5.0/en/triggers.html

    P.S. It would be better to move this thread to Forum -> Design & Development -> Databases -> MySQL(?) section.
     
    2WDH.com, Nov 25, 2011 IP
  4. edduvs

    edduvs Well-Known Member

    Messages:
    394
    Likes Received:
    31
    Best Answers:
    3
    Trophy Points:
    160
    #4
    Shanmugappriya, a MySQL trigger is an command you set that triggers (starts) AFTER/BEFORE update,insert (ON UPDATE/INSERT) of any row.

    I recommend you these schemas
    http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_7004.htm hope this is helpfull.


     
    edduvs, Nov 26, 2011 IP
  5. shanmugappriya

    shanmugappriya Peon

    Messages:
    92
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    thanks for replays...
     
    shanmugappriya, Dec 3, 2011 IP