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 are functions in the sql server?

603


Explain about SQL server 2005?

560


What function does a database engine serve in the sql server?

571


What are the new features are introduced in sql server 2012 reporting services?

107


What is the difference between createstatement and preparedstatement?

494






What is the purpose of the master database?

602


What is difference statement and preparedstatement?

550


What are the differences between clustered and non-clustered index?

539


Tell me the difference between clustered and non-clustered index?

516


Why do we need normalization?

497


What is the difference between SQL notification and SQL invalidation?

591


When a primary key constraint is included in a table, what other constraints does this imply?

603


What are constraints?

588


How to test odbc dsn connection settings?

536


you have developed an application which uses many stored procedures and triggers to update various tables users ocassionally get locking problems which tool is best suited to help you diagnose the problem? : Sql server administration

531