To update the column name of an sql table find the id of table from sysobjects table and update the syscolumns table as follows.
DECLARE @id INT
SELECT @id=[id] FROM sysobjects WHERE [name] = 'ContactDetails'
UPDATE syscolumns SET [name] ='Users_ID' WHERE [id]=@id AND [name] = 'UserID'
No comments:
Post a Comment