Programming Guide



SQL

Executes a SQL statement

Synopsis

DBMS [ WITH CONNECTION connection ] SQL SQLstatement

Arguments

WITH CONNECTION connection
Name of connection to associate with the statement. If the clause is not used, Panther issues the statement on the default connection.

SQLstatement
SQL statement to be sent to the database engine. The syntax of the statement can be the format needed by your database engine.

Description

DBMS SQL sends the specified statement to the database engine for execution after colon expansion is performed. If a connection is not specified, Panther uses the default cursor on the default connection.

SQLstatement can be in the format needed by your database engine. This allows you to access all the features of your database engine.

For new applications, this command is no longer recommended. For SQL statements that return data, use DBMS QUERY. For SQL statements that do not return data (such as, INSERT, UPDATE and DELETE), use DBMS RUN.

Example

DBMS SQL SELECT title_id, name, dir_first_name, \
dir_last_name FROM titles
DBMS SQL INSERT INTO actors \
(actor_id, last_name, first_name) VALUES \
(:+actor_id, :+last_name, :+first_name)

See Also

QUERY, RUN