Previous Topic: Example 1.Next Topic: SET CURRENT SQLID


Example 2.

Put the maximum salary in the employee table into the host variable MAXSALARY.

 EXEC SQL
      SELECT MAX(SALARY)
      INTO :MAXSALARY
      FROM CA.TEMPL
 END-EXEC