Entering content frame

Background documentation sql Method Locate the document in the library structure

Definition

sql (cmd_string)

Use

sql is a method of the Loader class. This method is used to send the Loader command specified under cmd_string or an SQL statement to the Loader Server program.

Result

If the statement is executed successfully, the result value is 0

If executing the statement causes an SQL error, the number of the error message for the SQL statement is returned.

If executing the statement causes a Loader error, a LoaderError exception is triggered.

Example

To query whether the CUSTOMER table exists:

result = session.sql ('EXISTS TABLE CUSTOMER')

 

Leaving content frame