Peristiwa
31 Mac, 11 PTG - 2 Apr, 11 PTG
Acara pembelajaran SQL, Fabric dan Power BI terbesar. 31 Mac - 2 April. Gunakan kod FABINSIDER untuk menjimatkan $400.
Daftar hari iniPelayar ini tidak lagi disokong.
Naik taraf kepada Microsoft Edge untuk memanfaatkan ciri, kemas kini keselamatan dan sokongan teknikal yang terkini.
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
Returns the default nullability for the database for this session.
Transact-SQL syntax conventions
GETANSINULL ( [ 'database' ] )
'database'
Is the name of the database for which to return nullability information. *database is either char or nchar. If char, database is implicitly converted to nchar.
int
GETANSINULL returns 1 if the database's nullability allows for null values. This return value also requires that the column or data type nullability isn't explicitly defined. The ANSI NULL default is 1.
To enable the ANSI NULL default behavior, one of these conditions must be set:
ALTER DATABASE database_name SET ANSI_NULL_DEFAULT ON
SET ANSI_NULL_DFLT_ON ON
SET ANSI_NULL_DFLT_OFF OFF
The following example returns the default nullability for the AdventureWorks2022
database.
USE AdventureWorks2022;
GO
SELECT GETANSINULL('AdventureWorks2022')
GO
Here's the result set.
------
1
(1 row(s) affected)
Peristiwa
31 Mac, 11 PTG - 2 Apr, 11 PTG
Acara pembelajaran SQL, Fabric dan Power BI terbesar. 31 Mac - 2 April. Gunakan kod FABINSIDER untuk menjimatkan $400.
Daftar hari ini