Difference between writing SQL query and stored procedure ?

Answer Posted / gayathri

Every query is submited it will be compiled & then
executed.where as stored procedure is compiled
when it is submitted for the first time and this compiled
content is stored in something called procedure cache,
for subsequent calls no compilation,just execution & hence
better performance than query.
In Query we can execute only 1 statement. Stored Procedure:
In Stored Procedure we can execute Batch of Queries

Is This Answer Correct ?    103 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Suppose you want to implement the many-to-many relationships while designing tables. How would you do it?

527


What is transaction server explicit transaction?

530


What is the name of reporting services config file and what’s it’s used for?

107


Explain candidate key, alternate key, and composite key?

575


What the different components in replication and what is their use?

501






What is sql server programming?

530


How to rename an existing column with the "sp_rename" stored procedure in ms sql server?

540


What is difference between inner join and full join?

535


User wants only to display only pdf as export option in report manager. How to achieve this?

171


How use inner join in sql server?

601


Explain about system stored procedure?

581


How do I view a procedure in sql server?

521


Does table partitioning improve performance?

523


you accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover? : Sql server administration

701


Explain difference between cross join and full outer join?

545