IF NOT EXISTS ( SELECT  *
                FROM    dbo.sysobjects
                WHERE   id = OBJECT_ID(N'[dbo].[DrugPrices]')
                        AND OBJECTPROPERTY(id, N'IsUserTable') = 1 )
    BEGIN
        CREATE TABLE [dbo].[DrugPrices]
            (
              [Id] [INT] NOT NULL ,
              [DrugCode] [NVARCHAR](MAX) NULL ,
              [BrandCode] [NVARCHAR](MAX) NULL ,
              [NationalCode] [NVARCHAR](MAX) NULL ,
              [OrgCode] [NVARCHAR](MAX) NULL ,
              [GenericName] [NVARCHAR](MAX) NULL ,
              [Price] [MONEY] NULL ,
              [PatientPercent] [FLOAT] NULL ,
              [Dosage] [NVARCHAR](MAX) NULL ,
              [Form] [NVARCHAR](MAX) NULL ,
              [Condition] [NVARCHAR](MAX) NULL ,
              [InsuranceOrgCode] [INT] NULL ,
              [InsertDate] [DATETIME] NULL ,
              CONSTRAINT [PK_UpdateDrugPrice] PRIMARY KEY CLUSTERED
                ( [Id] ASC )
            )
        ON  [PRIMARY]

        ALTER TABLE [dbo].[DrugPrices] ADD  CONSTRAINT [DF_DrugPrice_InsertDate]  DEFAULT (GETDATE()) FOR [InsertDate]

    END
