ReNumber_IDColumn_inTable

Reset numbers in ID column, with help from AI.
The StoredProcedure will move data in columns other than ID into temporary table, then adds ID column with new numbers, then move new data in all columns back to original table, and finally deletes temp table.
Columns need to be passed as argument since it is not smart enough to recognize ID column.
ID column will be named ID.
Works beautifully and will be using it as maintenance procedures.
Update 2023-12-25: Adding ability to restore index and full-text search catalog, columns are now hard-coded, will make them variable in next version.

CodeFunctionName What is this?

Public

Tested

Original Work

Access is limited.

Login here using your Linkedin account. to see or download code.

No registration, not another password to remember, login using your Linkedin account and have access to all public codes in Mydevlib.com

Linkedin Login

@table_name VARCHAR(500), @ColumnList varchar(2000), @temp_table_name VARCHAR(500)

[Schema1].[ReNumber_IDColumn_inTable] 'Langs' , 'LanguageID, LanguageName, LanguageDescription, DateAdded', 'TableNameTemp'

Views 264

Downloads 116

CodeID
DB ID