I have the following Script.
USE [PS_GameData] GO /****** Object: Table [dbo].[Guilds] Script Date: 07/24/2018 17:33:22 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[Guilds]( [RowID] [int] IDENTITY(1,1) NOT NULL, [GuildID] [int] NOT NULL, [GuildName] [varchar](30) NOT NULL, [MasterUserID] [varchar](12) NOT NULL, [MasterCharID] [int] NOT NULL, [MasterName] [varchar](30) NOT NULL, [Country] [tinyint] NOT NULL, [TotalCount] [smallint] NOT NULL, [GuildPoint] [int] NOT NULL, [Del] [tinyint] NOT NULL, [CreateDate] [datetime] NOT NULL, [DeleteDate] [datetime] NULL, CONSTRAINT [PK_Guilds] PRIMARY KEY CLUSTERED ( [GuildID] 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 SET ANSI_PADDING OFF GO ALTER TABLE [dbo].[Guilds] ADD CONSTRAINT [DF_Guilds_Del] DEFAULT (0) FOR [Del] GO
I want to Execute but when I try Create the table I get an error:
Msg 2714, Level 16, State 5, Line 2 There is already an object named 'PK_Guilds' in the database. Msg 1750, Level 16, State 0, Line 2 Could not create constraint. See previous errors. Msg 4902, Level 16, State 1, Line 2 Cannot find the object "dbo.Guilds" because it does not exist or you do not 'have permissions.'
I think I should bore the PK_Guilds but I do not know where or how I get it in the SQL server DB 2008 R2