Statement Terminators
Statement terminators separate one OpenSQL statement from another. In interactive OpenSQL, the statement terminator is the semicolon (;). Statements must be terminated with a semicolon when entering two or more OpenSQL statements before issuing the go command (\g), selecting the Go menu item, or issuing another Terminal Monitor command.
In the following example, the first and second statements are terminated by semicolons. The third statement need not be terminated with a semicolon, because it is the final statement.
select * from addrlst;
select * from emp
where fname = 'john';
select * from emp
where mgrname = 'dempsey'\g
If only one statement is entered, the statement terminator is not required. For example, the following single statement does not require a semicolon:
select * from addrlst\g
In embedded OpenSQL applications, the use of a statement terminator is determined by the rules of the host language. For details, see the Embedded SQL Companion Guide.