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                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
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
WHAT IS TRIGGERS IN SQL? AND WHAT IS THE BENIFIT?
 Question Submitted By :: ASH9818956002
I also faced this Question!!     Rank Answer Posted By  
 
  Re: WHAT IS TRIGGERS IN SQL? AND WHAT IS THE BENIFIT?
Answer
# 1
Triggers are the system generated events.
for example,
u have a table emp,in tat u can create a trigger which will 
be activated if anyone performs any action such as insert, 
update, delete on tat table.In tat trigger u can write code 
which copies the updated info into another table.
we  can provide security to the data by mentioning before 
clause in tat trigger by which we can restrict the 
modifications anyone can make to our table.

CREATE TRIGGER DelhiDel ON [Customers]
FOR DELETE
AS
IF (SELECT state FROM deleted) = ‘Delhi’
BEGIN
PRINT ‘Can not remove customers from Delhi’
PRINT ‘Transaction has been canceled’
ROOLBACK
END
 
Is This Answer Correct ?    9 Yes 2 No
Mallika
 
  Re: WHAT IS TRIGGERS IN SQL? AND WHAT IS THE BENIFIT?
Answer
# 2
There are mainly two type trigger
1)After trigger
2)Insted of trriger

Baisicalt its like a stroeprocedure...
 
Is This Answer Correct ?    2 Yes 3 No
Sumesh
 
 
 
  Re: WHAT IS TRIGGERS IN SQL? AND WHAT IS THE BENIFIT?
Answer
# 3
like as storeprocedure
it is userdefind function ther is no parameters 

1)After trigger:

2)Insted of trriger
 
Is This Answer Correct ?    0 Yes 4 No
Kavithareddy
 
  Re: WHAT IS TRIGGERS IN SQL? AND WHAT IS THE BENIFIT?
Answer
# 4
A 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.
 
Is This Answer Correct ?    0 Yes 1 No
Ashish Tripathi
 
  Re: WHAT IS TRIGGERS IN SQL? AND WHAT IS THE BENIFIT?
Answer
# 5
Triggers are the system generated events.
for example,
u have a table emp,in tat u can create a trigger which will 
be activated if anyone performs any action such as insert, 
update, delete on tat table.In tat trigger u can write code 
which copies the updated info into another table.

A 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.
 
Is This Answer Correct ?    1 Yes 0 No
Rami Reddy.k
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
What is cursor ? And what is difference between Trigger ? HCL1
what is the difference between group and having give an example with query and sample output  2
What is the use of MOVE keyword in restore command IBM2
How To Make password Protected SQL Server 2005 Database i.e when i open SQL Server database then ask for password.  1
Using query analyzer, name 3 ways you can get an accurate count of the number of records in a table? eFunds5
how to replace double quotes by single quotes in sql server CAC2
How to display n-1 columns from n number of columns, from a single table in MS SQL server 2005?  1
what is index seek and index scan?  2
What are the advantages of using views. Why do we need views when we have SPs? 247Customer3
What is a cursor in SQL Server 2000 and their types?  4
What is the order in which the SQL query is executed? list them in order. CTS1
1. What are the grouping function in SQL ? 2. If base table of a view deleted means, what will happen while we querying on view ? will give any error ? 3. Difference between DROP, DELETE, TRUNCATE table ? 4. What is constraints and types ? 5. What is max size of nchar & nvarchar ? 6. Define ROLLBACK, COMMIT, SAVE POINT 7. How non-clustered better ? or rank the Clustered, Non-Clustered and Table scan in performance wise 8. Select 10 rows from a table ? 9. Define DML, DDL, DCL, DTL commands ? 10. What is mean by NULL value ? NULL means "" or 0 or undefined ? 11. Default constraints ? 12. Can we have more then primary Key in table ? 13. Type of integrity ? Entity, Referential, Domain ? Perot-Systems8
can you any body tell me while running BCP Out in instance in sql server 2000 is getting error. Error = [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.?  1
Rate yourself in .NET and SQL ? Cognizent1
Explain Active/Active and Active/Passive cluster configurations?  1
What is a trigger?  3
What is the role that is required for killing a process What is the role that is required for creating a linked server IBM1
please can anyone answer this query Table 1 has 2 columns: EmployeeId,Age Table 2 has 2 columns: EmployeeId, Region Write SQL to Find the region who has the oldest person  7
What is Files and Filegroups in SQL Server & it's implementation. Zenith1
Explian different types of BACKUPs avaialabe in SQL Server? Given a particular scenario, how would you go about choosing a backup plan? HCL2
 
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