Representing a SQL Statement as a Character String
Within a DSQL application, a SQL statement can come from different sources. It might come directly from a user who enters a statement at a prompt, as does
isql. Or it might be generated by the application in response to user interaction. Whatever the source of the SQL statement, it must be represented as a SQL statement string, a character string that is passed to DSQL for processing.
SQL statement strings do not begin with the
EXEC SQL prefix or end with a semicolon (;) as they do in typical embedded applications. For example, the following host-language variable declaration is a valid SQL statement string:
char *str = "DELETE FROM CUSTOMER WHERE CUST_NO = 256";