MS SQL Server 发生错误
Error Creating Table: "There is already an object named 'table' in the database", but I have no table and not any constraint with the same name in database.
我必须通知您,这是在对表执行重命名然后创建以旧表名命名的表之后发生的。
例子:
sp_rename OldTable, NewTable
Create Table [OLDTable] ([id] [int] Identity(1,1) NOT NULL)
然后它给了我错误
如果有人知道答案,我已经搜索了几个小时,我很乐意解决这个问题。
最佳答案
尝试 SELECT * FROM sys.objects WHERE name LIKE '%yout_table_name%'
查看所有具有给定名称的现有系统对象。
关于sql - 创建表 : "There is already an object named ' table' in the database", 时出错,但我对该名称没有任何限制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11781489/