DBCREATE_TABLE_OPTS= LIBNAME Statement Option

Specifies DBMS-specific syntax to add to the CREATE TABLE statement.

Valid in: SAS/ACCESS LIBNAME and CONNECT statements
Category: Data Set Control
Alias: POST_STMT_OPTS=
Default: none
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, PostgreSQL, SAP ASE, SAP HANA, SAP IQ, Snowflake, Spark, Teradata, Vertica, Yellowbrick
Notes: Support for Spark was added in SAS 9.4M7.
Support for Yellowbrick was added in SAS 9.4M7.
Tips: If you are already using DBTYPE= within an SQL CREATE TABLE statement, you can also use it to include column modifiers.
If you want all output tables to be in the default (non-TEXTFILE) format, see the examples in this section.
See: DBCREATE_TABLE_EXTERNAL= LIBNAME option, DBCREATE_TABLE_EXTERNAL= data set option, DBCREATE_TABLE_LOCATION= data set option, DBCREATE_TABLE_OPTS= data set option, DBTYPE= data set option, POST_STMT_OPTS= data set option, POST_TABLE_OPTS= data set option, PRE_STMT_OPTS= data set option, PRE_TABLE_OPTS= data set option

Syntax

DBCREATE_TABLE_OPTS='DBMS-SQL-clauses'

Required Argument

DBMS-SQL-clauses

specifies one or more DBMS-specific clauses that can be appended to the end of an SQL CREATE TABLE statement.

Details

You can use this option to add DBMS-specific clauses to the end of the SQL CREATE TABLE statement. The SAS/ACCESS engine passes the SQL CREATE TABLE statement and its clauses to the DBMS. The DBMS then executes the statement and creates the DBMS table. This option applies only when you are creating a DBMS table by specifying a libref that is associated with DBMS data.

If you need to add an option in a location other than at the end of your CREATE TABLE statement, use one of these data set options: POST_TABLE_OPTS=, PRE_STMT_OPTS=, and PRE_TABLE_OPTS=. For example, for Greenplum, a WITH clause should appear after the table name but before a DISTRIBUTED RANDOMLY clause in a CREATE TABLE statement. You should therefore specify a WITH clause using the POST_TABLE_OPTS= data set option.

Examples

Example 1: Create All Hive Tables in ORC Format

libname x hadoop … DBCREATE_TABLE_OPTS="stored as ORC";

Example 2: Create All Hive Tables in RCFILE Format

libname x hadoop … DBCREATE_TABLE_OPTS="stored as RCFILE";

Example 3: Create All Hive Tables in SEQUENCEFILE Format

libname x hadoop … DBCREATE_TABLE_OPTS="stored as SEQUENCEFILE";
Last updated: February 3, 2026