Is CONCAT_NULL_YIELDS_NULL SQL a persistent runtime setting? (Server 2000 and later)

Well, I know that CONCAT_NULL_YIELDS_NULL will always be set to ON in future versions of SQL (enter the MSDN search parameters (yadda, yadda)), so bear with me.

Drilling Details: MSSQL 2000 Enterprise (v8 sp4) AKA Critatious Period Edition Platform.

NULL will be shown below.

SELECT 'abc' + NULL; 

I see. But you can get around this as follows:

SET CONCAT_NULL_YIELDS_NULL OFF;
SELECT 'abc' + NULL; 

In this case, the result is "abc". From here, future sql statements will combine with NULL. But is this a "constant" runtime? For example, does this option apply only to my SQL server session, or apply to statements executed by all users?

, _YIELDS_NULL ON MSSQL OFF ( , ).

: . (, , ). , , "SET CONCAT_NULL_YIELDS_NULL" ON. .

: CONCAT_NULL_YIELDS_NULL ON SQL-?

+1
2

CONCAT_NULL_YIELDS_NULL :

  • - ,

    • Microsoft SQL Server Management Studio, . "".
  • T-SQL

    ALTER DATABASE _ SET {CONCAT_NULL_YIELDS_NULL OFF}

. concat_null_yields_null . , SQL Server Management Studio, SQL 2005. SQL Server Profiller, .

SQL 2000 , .

+1

BOL ,

SET , SET .

, . SP .

+1

Source: https://habr.com/ru/post/1546128/


All Articles