SQL Server interview questions & Answers 9

What's the purpose of Stored Procedure?

Stored Procedures has some advantages that’s why we use SP.
some advantages are:
(1) Stored Proc is a Pre Compiled statement. So it reduces network Traffic.
(2) We can execute SP inside SP.
(3) Through it we can protect from SQL Injection.

 

 

What is a trigger?

Triggers are basically used to implement business rules. Triggers is also similar to stored procedures. The difference is that it can be activated when data is added or edited or deleted from a table in a database.

 

What is an Index?

Index is a database object which improves the efficiency of the query.

When queries are run against a DB, an index on that DB basically helps in the way the data is sorted to process the query for faster and data retrievals are much faster when we have an index.


0 Response to "SQL Server interview questions & Answers 9"

Post a Comment