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

What is dimension table? : sql server analysis services, ssas

562


Explain different forms of normalization?

534


What are various limitations of the views?

616


Can I work with several databases simultaneously? : sql server management studio

565


What are points to remember while using the fillfactor argument?

532






What is a cube? : sql server analysis services, ssas

566


What is difference between view and materialized view?

540


How important do you consider cursors or while loops for a transactional database?

537


what are the different types of replication you can set up in sql server? : Sql server database administration

517


How to compose an inquiry to demonstrate the points of interest of an understudy from students table whose name begins with k?

674


Explain Geometry datatype in sql server 2008 with example

593


Explain some stored procedure creating best practices or guidelines?

526


What are “unrepeatable reads”?

745


Explain the steps to use transact-sql cursor?

529


how do you implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql server database administration

585