7. Embedded SQL for Pascal : Embedded SQL Statement Syntax for Pascal : Terminator
 
Share this page                  
Terminator
The terminator for Pascal is the semicolon (;). For example, a select statement embedded in a Pascal program would look like:
exec sql select ename
         into :namevar
         from employee
         where eno = :numvar;
An embedded statement cannot be followed on the same line by another embedded statement or a Pascal statement. Doing so will cause preprocessor syntax errors on the second statement. Following the Pascal terminator, only comments and white space are allowed to the end of the line.
Even though some Pascal statements, such as the last statement before a Pascal else clause, do not allow a semicolon, Embedded SQL requires the semicolon. For more details on this and other coding requirements, see Advanced Processing (see page Advanced Processing) in this chapter.