All Articles on SQL - Stored Procedures

Adding a Transaction to a Stored Procedure

Posted 09 March 2010 - Category SQL Sub Category Stored Procedures

Transactions make sure a series of updates to the database happen together or else rollback gracefully.

Generate next incremental no in a table column using the max function

Posted 31 January 2010 - Category SQL Sub Category Stored Procedures

Usually the identity column will be used to create a unique key value in a table. Sometimes though finding the next no by using the current values is useful.

Update a database row if the record exists otherwise insert all using a stored procedure

Posted 05 March 2010 - Category SQL Sub Category Stored Procedures

Sometimes you don't know if the record exists in the table and the insert / update should be carried out within the one stored procedure call. Heres how.

Find second row in a tables sort order

Posted 04 January 2010 - Category SQL Sub Category Stored Procedures

Choose from the right hand menu to see full lists within subcategories