Download SQL Training Videos, Materials, and Important Real-time Interview Questions with Answers: https://bit.ly/3xtviXC
Download SQL Materials with Interview Questions and Answers: https://imojo.in/SQLForDataAnalysis
Download Important SQL Interview Questions with Answers: https://imojo.in/SQLQuestionsPandeyGu...
Download complete SQL Notes: https://imojo.in/sqlpandeyguruji
----------------------------------------------------------------------------------------------------------------------------
Real-time one-to-one training, Enroll Now: https://pandeyguruji.graphy.com/
Free training materials: https://t.me/pandeyguruji
For any queries contact me on social media:
Facebook: / mpandeyguruji
Instagram: / pandey_guruji
Linkedin: / mukesh-pandey-1a151634
Q&A Session: https://t.me/+Mtp3M1b_nXc3YjE9
-------------------------------------------------------------------------------------------------------------------
SQL Tutorial for Beginners in Hindi: https://bit.ly/3CwfnGB
SQL Tutorial for Beginners in English: https://bit.ly/3qVI3GQ
SQL Practice Exercises with Solutions: https://bit.ly/3Eb5tNg
SQL Interview Questions: http://bit.ly/2CR6wCZ
Advanced SQL Interview Questions: https://bit.ly/3HnMrnN
Crack SQL Interview: https://bit.ly/3caxIyb
SQL Live Training: https://bit.ly/3kXqOl1
Career Guidance: https://bit.ly/3FffkRf
IT Technology News & Updates: https://bit.ly/3FeNQvc
--------------------------------------------------------------------------------------------------------------------
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. But Function is
compiled and executed every time when it is called.
BASIC DIFFERENCE
1. The function must return a value but in Stored Procedure, it is optional (Procedure can
return zero or n values).
2. Functions can have only input parameters whereas Procedures can have input/output
parameters.
3. A Function can be called from Procedure whereas Procedures cannot be called from
Function
4. From a procedure, we can call another procedure or a function whereas from a function
we can call another function but not a procedure.
ADVANCE DIFFERENCE
1. The procedure allows SELECT as well as DML (INSERT/UPDATE/DELETE) statement
in it whereas Function allows only SELECT statement in it.
2. Procedures cannot be utilized in a SELECT statement whereas Function can be
embedded in a SELECT statement.
3. Stored Procedures cannot be used in the SQL statements anywhere in the
WHERE/HAVING/SELECT section whereas Function can be.
4. Functions that return tables can be treated as a row set. This can be used in JOINs with
other tables
5. The exception can be handled by a try-catch block in a procedure whereas a try-catch
block cannot be used in a Function.
6. We can go for Transaction Management in Procedure whereas we can’t go into
Function.
7. We call a procedure using EXECUTE/ EXEC command whereas a function is called by
using the SELECT command only.
#pandeyguruji ,#storedprocedure , #SPVsFunction
-------------------------------------------------------------------------------------------------------------------
Disclaimer - This video is just for educational purposes.
Copyright Disclaimer under Section 107 of the Copyright Act 1976, allowance for the "fair use".
All the images, music, and graphics used in this video belong to their respective owners and I or this channel do not claim any right over them.
Copyright Disclaimer under section 107 of the Copyright Act 1976, allowance is made for “fair use” for purposes such as criticism, comment, news reporting, teaching, scholarship, education, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing