Requires Free Membership to View

SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.Columns
WHERE TABLE_NAME = 'Address'
You can rename a column using the following example:
EXECUTE sp_rename N'dbo.aaa.NewColumnName', N'NewColumnName2', 'COLUMN'
You can execute it from VB.NET, as well, by using the SqlCommand object and setting the CommandText property to the SQL code you want to execute. For a similar example, look at this expert answer on restoring SQL Server databases in VB.NET.
This was first published in October 2008
Join the conversationComment
Share
Comments
Results
Contribute to the conversation