Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin.
Search for scripts directly from SSMS, and instantly access any saved scripts in your
SSC briefcase from the favorites tab.
Download now (direct download link)
Thank this author by sharing:
exec usp_DBA_createSPs 'MyTable', 'tmp', 'col1, col2'createsproc_tmp_MyTable_save - does update if row exists (based on key) and insert if none. returns ID of row updated/insertedproc_tmp_MyTable_delete delete (based on key) with insert to deleted tablefTbl_tmp_MyTable_get - no paging, with "where" templates for each parameter typefTbl_tmp_MyTable_list - provide paging
I have written this script while back. I have used one of the scripts I have found online.Sorry I do not remember where I've got script originally
It was changed by adding more logic to SP, adding functions, as well as fixing size limitation and other bugs.
Insert / Deletes
Optimizing inserts and deletes
Script to delete orphaned users
How to delete tables using scripts