Results 1 to 12 of 12

Thread: what is a trigger?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Expert Member
    Join Date
    Apr 2007
    Answers
    500

    Re: what is a trigger?

    DDL tiggers are operate on Create, Drop,Alter and are useful to perform administrative tasks and enforce business rules.

    DMl triggers are operate on Insert,Update,Delete and they are useful to enforce business rules and maintain data integrity when dml commands operate on tables(views).


  2. #2
    Junior Member
    Join Date
    Dec 2007
    Answers
    1

    Thumbs up Re: what is a trigger?

    A DML trigger is a stored procedure that goes into effect when you insert, delete, or update data in a table. You can use triggers to perform a number of automatic actions, such as cascading changes through related tables, enforcing column restrictions, comparing the results of data modifications, and maintaining the referential integrity of data across a database.

    DML Triggers are automatic. They work no matter what caused the data modification. A trigger is specific to one or more of the data modification operations, update, insert, and delete and is executed once for each SQL statement.

    For example, to prevent users from removing any publishing companies from the publishers table, you could use this trigger:


    Thanks
    Shobi

    Last edited by shobi_at; 12-20-2007 at 01:31 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact