Selecting a SAS/ACCESS Method

Methods for Accessing DBMS Tables and Views

You can often complete a task in SAS/ACCESS in several ways. For example, you can access DBMS tables and views by using the LIBNAME statement or the SQL pass-through facility. Before processing complex or data-intensive operations, you might want to test different methods first to determine the most efficient one for your particular task.

SAS/ACCESS LIBNAME Statement Advantages

You should use the SAS/ACCESS LIBNAME statement for the fastest and most direct method of accessing your DBMS data except when you need to use SQL that is not ANSI-standard. ANSI-standard SQL is required when you use the SAS/ACCESS library engine in the SQL procedure. However, the SQL pass-through facility accepts all SQL extensions that your DBMS provides.

Here are the advantages of using the SAS/ACCESS LIBNAME statement.

SQL Pass-Through Facility Advantages

Here are the advantages of using the SQL pass-through facility.

SAS/ACCESS Features for Common Tasks

Here is a list of tasks and the features that you can use to accomplish them.

SAS/ACCESS Features for Common Tasks

Task

SAS/ACCESS Features

Read DBMS tables or views

LIBNAME statement1

SQL pass-through facility

Create DBMS objects, such as tables

LIBNAME statement1

SQL pass-through facility EXECUTE statement

Update, delete, or insert rows into DBMS tables

LIBNAME statement1

SQL pass-through facility EXECUTE statement

Append data to DBMS tables

LIBNAME statement and APPEND procedure1

SQL pass-through facility EXECUTE statement

SQL pass-through facility INSERT statement

List DBMS tables

LIBNAME statement and SAS Explorer window1

LIBNAME statement and DATASETS procedure1

LIBNAME statement and CONTENTS procedure1

LIBNAME statement and SQL procedure dictionary tables1

Delete DBMS tables or views

LIBNAME statement and SQL procedure DROP TABLE statement1

LIBNAME statement and DATASETS procedure DELETE statement1

SQL pass-through facility EXECUTE statement

1 LIBNAME statement refers to the SAS/ACCESS LIBNAME statement.
Last updated: February 3, 2026