filmov
tv
DIFFERENCE BETWEEN STORED PROCEDURES AND FUNCTIONS IN SQL | SQL Interview Question | IQBees
Показать описание
Hello Friends,
Difference between stored procedure and function is the most asked question in the interview. Most of us are aware about it but this video is for those who are new to sql or planning for an interview.
DIFFERENCE BETWEEN STORED PROCEDURES AND FUNCTIONS IN SQL
1. Stored Procedures are pre-compiled objects which are compiled for the first time and its compiled format is saved, which executes (compiled code) whenever it is called.
A function is compiled and executed every time whenever it is called.
2. An exception can be handled by try-catch block in a Procedure whereas try-catch block cannot be used in a Function.
3. We can use Transactions in Procedure whereas we can't use Transactions in Function.
4. The function must return a value but in Stored Procedure it is optional. Even a procedure can return zero or n values.
5. Functions can be called from Procedure whereas Procedures cannot be called from a Function.
6. The procedure allows SELECT as well as DML(INSERT/UPDATE/DELETE) statement in it whereas Function allows only SELECT statement in it.
7. Function can be used with Select, Where and Having Clause and even used with joins as well But, Can't use same with procedure
Regards,
IQBees
difference between functions and stored procedures in sql server,difference between functions and stored procedures in sql server hindi,difference between functions and stored procedures,difference between stored procedure and function in sql server in hindi,difference between stored procedure and function in sql server,difference between stored procedure and function,what is the difference between stored procedure and function in sql
#differencebetweenstoredprocedureandfunctioninsql #differencebetweenstoredprocedureandfunctioninsqlserver
#storedprocedureandfunction
Difference between stored procedure and function is the most asked question in the interview. Most of us are aware about it but this video is for those who are new to sql or planning for an interview.
DIFFERENCE BETWEEN STORED PROCEDURES AND FUNCTIONS IN SQL
1. Stored Procedures are pre-compiled objects which are compiled for the first time and its compiled format is saved, which executes (compiled code) whenever it is called.
A function is compiled and executed every time whenever it is called.
2. An exception can be handled by try-catch block in a Procedure whereas try-catch block cannot be used in a Function.
3. We can use Transactions in Procedure whereas we can't use Transactions in Function.
4. The function must return a value but in Stored Procedure it is optional. Even a procedure can return zero or n values.
5. Functions can be called from Procedure whereas Procedures cannot be called from a Function.
6. The procedure allows SELECT as well as DML(INSERT/UPDATE/DELETE) statement in it whereas Function allows only SELECT statement in it.
7. Function can be used with Select, Where and Having Clause and even used with joins as well But, Can't use same with procedure
Regards,
IQBees
difference between functions and stored procedures in sql server,difference between functions and stored procedures in sql server hindi,difference between functions and stored procedures,difference between stored procedure and function in sql server in hindi,difference between stored procedure and function in sql server,difference between stored procedure and function,what is the difference between stored procedure and function in sql
#differencebetweenstoredprocedureandfunctioninsql #differencebetweenstoredprocedureandfunctioninsqlserver
#storedprocedureandfunction
Комментарии