DBNULLWHERE= LIBNAME Statement Option

Specifies whether character columns in a WHERE clause can contain NULL values.

Valid in: SAS/ACCESS LIBNAME statement
Category: Data Set Control
Default: YES
Interaction: If the DBNULL= data set option is specified, then the value of DBNULLWHERE= is automatically set to YES.
Data source: DB2 under UNIX and PC Hosts, Microsoft SQL Server, ODBC, Oracle, SAP HANA
See: DBNULL= data set option, DBNULLWHERE= data set option

Table of Contents

Syntax

DBNULLWHERE=YES | NO

Syntax Description

YES

specifies that there might be a NULL value for a column that is listed in a WHERE clause.

NO

specifies that none of the columns in a WHERE clause contain NULL values.

Details

This option applies to character columns only.

When DBNULLWHERE=YES, SAS/ACCESS verifies whether blank or NULL values are possible for each character column that you include in a WHERE clause.

When DBNULLWHERE=NO, SAS/ACCESS does not check to see whether NULL values are possible for the specified columns in a WHERE clause. When you know that none of your specified columns contain NULL values, specifying DBNULLWHERE=NO can result in a faster query because fewer conditions are being checked.

Last updated: February 3, 2026