简体   繁体   中英

Changing column name in Visual Studio SQL feature

I made the mistake of labeling 2 columns and putting integers in the titles and now I need to change them because they are obviously invalid. I just don't know in visual studio where I go to change this so it works across the entire project. I've changed it in the design view of the table but still get the error

[SqlException (0x80131904): Invalid column name '13DigiISBN'.

Assuming you are using SQL Server.

try this:

EXEC dbo.sp_rename @objname = N'dbo.[YourTable].[13DigiISBN]', @newname = N'NewColumnName'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM