chaitanya k
What is the difference between a query and stored procedure?
By chaitanya k in SQL Server on May 11 2007
  • bijeesh p
    Apr, 2008 23

    query and stored procedure do the same thing but the difference is that a query should be compiled everytime the query is executed,while the stored procedure is in compiled form when executed first time.I f we use stored procedureĀ  we can avoid recompilation of the query.

    • 2
  • kumar goutam
    May, 2008 22

    stored procedure comes with some major characterstics, as it consists in pre compiled format so the performance increase during dataaccess. incase of simple query it requires to complie again and again as per user request, but here its not required due to precompile format (*compile requires only ones).

    next it reduce the network traffice so impacts less burden on server and u can integrate it with different front-end applications (e.g. vb.bnet,c#,java etc) inorder to data access.

    come to next, due to precompile code resides in database server it provides more security and due to complicated queries can be integrated with one form it isĀ portable also.

    • 0
  • madhu sudan kumbakonam
    Aug, 2007 7

    every query is submited it will be compiled & then executed.where as stored procedure is compiled when it is submitted for the first time & this compiled content is stored in something called procedure cache,for subsequent calls no compilation,just execution & hence better performance than query.

    • 0
  • raj beniwal
    May, 2007 16

    By using Stored procedures we can seperate all the queries from the Business logic code.
    Therefore we can create a seperate layer.
    But while writing inline queries , all the queries have to be written (mixed up ) with the business logic code. This create problem while debugging.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS