Azure SQL Database Web vs Business Edition

前端 未结 4 1491
南方客
南方客 2020-12-23 11:11

Is there any difference between the Web Edition and Business Edition of Azure SQL Database other than the maximum supported database sizes? I\'m assuming the naming has some

4条回答
  •  生来不讨喜
    2020-12-23 11:55

    I have noticed a behavioral difference between the two versions. In the Business edition we have set up for QA, the following code snippet gets an error when applying the foreign key unless a "GO" is placed after adding the column. Then it works fine. This is not needed in the Web edition databases we have for development.

    IF NOT EXISTS (SELECT * 
                    FROM INFORMATION_SCHEMA.COLUMNS 
                   WHERE TABLE_SCHEMA='ASSIGN'
                     AND TABLE_NAME = 'ASSIGNTARGET_EXCEPTION' 
                     AND COLUMN_NAME = 'EXCESS_WEAR_FLAG')
        ALTER TABLE [ASSIGN].[ASSIGNTARGET_EXCEPTION] ADD [EXCESS_WEAR_FLAG] [varchar](1) NULL
    -- GO  -- placing this here makes this sectino work.
    IF NOT EXISTS (SELECT * 
                     FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS 
                    WHERE  TABLE_SCHEMA ='ASSIGN'
                      AND TABLE_NAME = 'ASSIGNTARGET_EXCEPTION' 
                      AND CONSTRAINT_NAME = 'CHK_ATEXCPTN_EXCESSWEARFLAG')
    BEGIN
        ALTER TABLE [ASSIGN].[ASSIGNTARGET_EXCEPTION]  WITH NOCHECK ADD  CONSTRAINT [CHK_ATEXCPTN_EXCESSWEARFLAG] CHECK  (([EXCESS_WEAR_FLAG]='N' OR [EXCESS_WEAR_FLAG]='Y'))
        ALTER TABLE [ASSIGN].[ASSIGNTARGET_EXCEPTION] CHECK CONSTRAINT [CHK_ATEXCPTN_EXCESSWEARFLAG]
    END
    

提交回复
热议问题