Friday, February 18, 2011

Learning stored procedures

Advantages of sp:
- capable of handling very complex queries
- utilizes resources of the db server not the app server
- convenient for moving app from platfrom to platform - business logic stays with the db

Sp structure:
CREATE PROCEDURE [PROCEDURE NAME]

/*
variables:
@variableName type
*/

AS

/*
SQL statements
*/

No comments:

Post a Comment