Dynamic creation of Insert, Update, Delete Stored procedure


Introduction

It is easy to write Insert, Update and Delete stored procedures for a table, but it may take lots of time and effort to write these basic stored procedure. Especially if you have lots of tables with lots of fields. That time might be better spent on other tasks.

I have written a stored procedure to help do this automatically, and this article explains how it works. This stored procedure, sp_et_create_sps_for_table, automates the creation of stored procedures for a table using the table name as a parameter. It dynamically creates the scripts for insert, update and delete stored procedures and then creates them. It gathers the primary key information of the table and creates the necessary scripts for the where clause of the update & delete stored procedures of the given table.

 

Click here to Read more….

kick it on DotNetKicks.com

Shout it

Advertisements

3 thoughts on “Dynamic creation of Insert, Update, Delete Stored procedure

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s