Programming Guide



SQL

Executes an 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 uses 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

This command is not recommended. For SQL statements that return data, use QUERY. For SQL statements that do not return data (such as INSERT, UPDATE and DELETE), use RUN.

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.

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