Embedded SQL statements must begin with the keywords exec sql and end with the keyword end-exec. The syntax for Embedded SQL statements is:
exec sql [at connection_name] sql_statement end-exec
where:
connection_name specifies the connection for the statement. See Chapter 5, “Connecting to Adaptive Server Enterprise,” for a description of connections. The at keyword is valid for Transact-SQL statements and the disconnect statement.
sql_statement is one or more Transact-SQL statements.