Posts

Showing posts from April, 2017

What are the limitations of triggers in Sql Server?

 These are the limitations of triggers in  Sql server 1. We can not pass the parameters for triggers  like Stores procedure , function etc.... 2. can not perform COMMIT or ROLLBACK.

What are the major difference's between Stored Procedure and Functions?

Stored Procedures Functions Stored procedure is a set of pre-Compiled sql statements, which will get executed for 1 st time and stored plan in the  Execution plan. Function is a reusable piece of code, which is used to execute same set of statements. And will return a value. Stored procedure will support exception handling such we can use try catch blocks. Functions  will  not  support exception handling we can not use try catch blocks. We can call a function in Stored procedures. We cannot  call store procedures in functions. Stored procedures can contain zero or N parameters. Functions must contain at least one parameter. Stored procedure always returns INTEGER as data type. Function will return any data Type . We can execute stored procedures’ by using EXEC command We can execute Functions by using SELECT command Sp’s will accept both input par...