IF NOT EXISTS
(
    SELECT COLUMN_NAME
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE TABLE_NAME = 'IHIOPrescription'
          AND COLUMN_NAME = 'TurnNo'
)
    ALTER TABLE dbo.IHIOPrescription ADD TurnNo SmallInt DEFAULT (0);


IF NOT EXISTS
(
    SELECT COLUMN_NAME
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE TABLE_NAME = 'TaminPrescription'
          AND COLUMN_NAME = 'TurnNo'
)
ALTER TABLE dbo.TaminPrescription ADD TurnNo SmallInt DEFAULT (0);

IF NOT EXISTS
(
    SELECT COLUMN_NAME
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE TABLE_NAME = 'TaminPrescriptionDetail'
          AND COLUMN_NAME = 'IsBulk'
)
    ALTER TABLE dbo.TaminPrescriptionDetail ADD IsBulk BIT DEFAULT (0);


	IF NOT EXISTS
(
    SELECT COLUMN_NAME
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE TABLE_NAME = 'IHIOPrescriptionDetail'
          AND COLUMN_NAME = 'IsBulk'
)
    ALTER TABLE dbo.IHIOPrescriptionDetail ADD IsBulk BIT DEFAULT (0);