Export (0) Print
Expand All
ABS
ALL
AND
ANY
AVG
bit
COS
COT
DAY
EXP
GO
IN
LEN
LOG
MAX
MIN
NOT
OR
PI
SET
SIN
STR
SUM
TAN
USE
VAR
Expand Minimize

GETANSINULL

SQL Server 2000

Returns the default nullability for the database for this session.

Syntax

GETANSINULL ( [ 'database' ] )

Arguments

'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.

Return Types

int

Remarks

When the nullability of the given database allows null values and the column or data type nullability is not explicitly defined, GETANSINULL returns 1. This is the ANSI NULL default.

To activate the ANSI NULL default behavior, one of these conditions must be set:

  • sp_dboption 'database_name', 'ANSI null default', true

  • SET ANSI_NULL_DFLT_ON ON

  • SET ANSI_NULL_DFLT_OFF OFF
Examples

This example checks the default nullability for the pubs database.

USE pubs
GO
SELECT GETANSINULL('pubs')
GO

Here is the result set:

------ 
1      

(1 row(s) affected)

See Also

System Functions

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft