我試圖在Microsoft SQL Server 2005(Express)上創建一個表。創建表時出錯:「數據庫中已存在名爲...的對象」,但沒有名稱對象
當我運行此查詢
USE [QSWeb]
GO
/****** Object: Table [dbo].[QSW_RFQ_Log] Script Date: 03/26/2010 08:30:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[QSW_RFQ_Log](
[RFQ_ID] [int] NOT NULL,
[Action_Time] [datetime] NOT NULL,
[Quote_ID] [int] NULL,
[UserName] [nvarchar](256) NOT NULL,
[Action] [int] NOT NULL,
[Parameter] [int] NULL,
[Note] [varchar](255) NULL,
CONSTRAINT [QSW_RFQ_Log] PRIMARY KEY CLUSTERED
(
[RFQ_ID] ASC,
[Action_Time] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
我得到這個錯誤消息
消息2714,級別16,狀態4,2號線 已經有一個名爲 'QSW_RFQ_Log' 對象數據庫。 Msg 1750,級別16,狀態0,行2可能 不創建約束。請參閱前面的 錯誤。
但如果我嘗試使用此查詢找到有問題的對象:
SELECT *
FROM QSWEB.sys.all_objects
WHERE upper(name) like upper('QSW_RFQ_%')
我得到這個
(0行(S)的影響)
到底是怎麼回事????
我知道這是愚蠢的! 我剛剛用我的剪貼粘貼了PK_,謝謝! – DavRob60 2010-03-26 13:13:42