Host input variables

These variables pass information to Adaptive Server. The application program assigns values to them. They hold data used in executable statements such as stored procedures, select statements with where clauses, insert statements with values clauses, and update statements with set clauses.

The following example uses the variables id and publisher as input variables:

exec sql begin declare section; 
     CS_CHAR id[7];
     CS_CHAR publisher[5];
 exec sql end declare section;
     ... 
 exec sql delete from titles where title_id = :id;
 exec sql update titles set pub_id = :publisher
     where title_id = :id;