ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
Explain Trigger with an example?
 Question Submitted By :: Grj
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Explain Trigger with an example?
Answer
# 1
A trigger is a SQL procedure that initiates an action when 
an event (INSERT, DELETE or UPDATE) occurs. Triggers are 
stored in and managed by the DBMS.Triggers are used to 
maintain the referential integrity of data by changing the 
data in a systematic fashion. A trigger cannot be called or 
executed; the DBMS automatically fires the trigger as a 
result of a data modification to the associated table. 
Triggers can be viewed as similar to stored procedures in 
that both consist of procedural logic that is stored at the 
database level. Stored procedures, however, are not event-
drive and are not attached to a specific table as triggers 
are. Stored procedures are explicitly executed by invoking 
a CALL to the procedure while triggers are implicitly 
executed. In addition, triggers can also execute stored 
procedures.
Nested Trigger: A trigger can also contain INSERT, UPDATE 
and DELETE logic within itself, so when the trigger is 
fired because of data modification it can also cause 
another data modification, thereby firing another trigger. 
A trigger that contains data modification logic within 
itself is called a nested trigger.
 
Is This Answer Correct ?    4 Yes 0 No
Rafi.sk
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
I have a website that allows customers to browse and place orders for certain products. I have 2 tables; Customers and Orders. The Customers table holds the customer records and the Orders table holds the orders placed by the customer. Both tables are tied based on the field Cust_ID. Example of the data is shown below: Cust_ID Cust_Name Cust_ID Product Amount Order_Date 1001 John Tan 1001 P-5211 $120.00 2/13/2006 1002 Michael Wong 1001 K-1428 $88.90 1/11/2006 1003 Mary Cheong 1003 C-0923 $82.50 1/27/2006 1004 Ahmad Suffian 1003 K-1428 $88.90 2/2/2006 Write a single SQL statement that extracts all purchase records with the following criteria: 1. Customer names starting with “M” only. 2. Orders placed within the current month only. 3. Amount does not exceed $100.00 The list must be sorted by order date with the latest order showing on top. Techno-Solutions3
What are the two virtual tables SQL Server maintains for triggers?  2
Which virtual table does a trigger use? TCS6
What are Sql Reporting Services and analysis services? Can u Explain  1
What's the difference between a primary key and a unique key? Wipro8
How do you measure the performance of a stored procedure? Infosys1
WRITE A FUNCTION TO DISPLAY THE OUTPUT OF AN EXISTING TABLE RANGE LIKE COMMAM SEPERATED VALUES LIKE RANGE1,RANGE2,... TVS2
what is the output for this query select * from employee where 1=1;  4
What is blocking and how would you troubleshoot it? HCL2
What are primary keys and foreign keys?  3
Explain the storage models of OLAP?  1
Differences between functions and stored procedures? 247Customer6
What is indexed views? plz explain with example?  1
can anybody tell us, how to select 2nd max salary from table. my id is ashish.akk@gmail.com Symphony21
What is an Index? Yardi-Software3
i need some interview questions on sql server developer plz any onee send some links.  1
select top 5 * from emp order by newid() my question is , how this query get executed?  4
How do you fine the performance tunning? Accenture2
how to copy sysdatabase file from c: Drive to D: Drive in SQL Server. IBM4
How do you read transaction logs  1
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com