Understanding QUOTED_IDENTIFIER

前端 未结 4 962
忘掉有多难
忘掉有多难 2020-12-03 15:05

We just ran into a problem with one of our stored procs throwing an error;

SELECT failed because the following SET options have incorrect settings: \'QUOTED_         


        
4条回答
  •  失恋的感觉
    2020-12-03 15:52

    SET QUOTED_IDENTIFIER ON
    
    GO
    
    SET ANSI_NULLS ON
    
    GO
    --SQL PROCEDURE, SQL FUNCTIONS, SQL OBJECTGO
    
    SET QUOTED_IDENTIFIER OFF
    
    GO
    
    SET ANSI_NULLS ON
    
    GO
    
    ANSI NULL ON/OFF:
    

    This option specifies the setting for ANSI NULL comparisons. When this is on, any query that compares a value with a null returns a 0. When off, any query that compares a value with a null returns a null value.

    QUOTED IDENTIFIER ON/OFF:
    

    This options specifies the setting for usage of double quotation. When this is on, double quotation mark is used as part of the SQL Server identifier (object name). This can be useful in situations in which identifiers are also SQL Server reserved words.

提交回复
热议问题