DBSASLABEL= LIBNAME Statement Option

Specifies the column labels an engine uses.

Valid in: SAS/ACCESS LIBNAME statement
Category: Data Set Control
Default: COMPAT
Data source: Amazon Redshift, Aster, DB2 under UNIX and PC Hosts, DB2 under z/OS, Google BigQuery, Greenplum, Hadoop, HAWQ, Impala, Informix, JDBC, Microsoft SQL Server, MySQL, Netezza, ODBC, OLE DB, Oracle, SAP ASE, SAP HANA, SAP IQ, Snowflake, Spark, Teradata, Vertica
Notes: Support for Spark was added in SAS 9.4M7.
Support for SAP HANA was added in November 2020 (SAS 9.4M7).
Tip: You can use this option to override the default behavior. It is useful for when PROC SQL uses column labels as headers instead of column aliases.
See: DBSASLABEL= data set option

Syntax

DBSASLABEL=COMPAT | DBMS | NONE

Syntax Description

COMPAT

specifies that the labels returned should be compatible with what the application normally receives—meaning that engines exhibit their normal behavior.

DBMS

specifies that the engine returns a label exactly as it is stored in the database.

Supports SAP HANA

NONE

specifies that the engine does not return a column label. The engine returns blanks for the column labels.

Details

By default, the SAS/ACCESS interface for your DBMS generates column labels from the column names instead of from the real column labels.

Example: Return Blank Labels for Aliases in Headings

This example shows how to use DBSASLABEL= as a LIBNAME option to return blank column labels so that PROC SQL can use the column aliases as the column headings.

libname mylib oracle user=myusr1 pw=mypwd1 dbsaslabel=none;
proc sql;
     select deptno as 'Department ID', loc as Location 
            from mylib.dept;

Without DBSASLABEL=NONE, aliases are ignored, and DEPTNO and LOC are used as column headings in the result set.

Last updated: February 3, 2026