Native SQL

Native SQL allows you to perform operations on databases over and above those in the Open SQL command set. In contrast to Open SQL, Native SQL supports not only operations on the local database active in the R/3 System, but also on any external databases.

Command set

Native SQL comprises all the static statements of the data definition language (DDL) and the data manipulation language (DML) used by the relational database system concerned. Statements for error handling and declaring host variables are not allowed (and not necessary).

In an ABAP/4 program, a Native SQL command must be introduced by EXEC SQL and concluded by ENDEXEC. To execute a Native SQL command, the database table does not have to be declared in the ABAP/4 Dictionary.

Since the DB language SQL is only partly standardized, you must always get the correct syntax for a Native SQL command from the documentation supplied by the database manufacturer. For this reason, the command set listed here is incomplete, but the following commands are always included:

Transaction management

Data definition

Data manipulation

Note

Since the DB language SQL is only partly standardized, it is not always possible to run an ABAP/4 program that uses these commands without adjusting the other database system (see Portability). If this is unavoidable, you should use Open SQL.

Further Help

Native SQL