Using SELECT statements in batches

You can include one or more SELECT statements in a batch.

See ”Hiding the contents of procedures, functions, triggers and views” in SQL Anywhere Server - SQL Usage.

Sybase IQ example

NoteFor examples, use the Sybase IQ demo database iqdemo.db. For installation information, see “The demo database”.

EIF EXISTS(SELECT *FROM isystabWHERE table_name='Employees' )THENSELECT Surname AS LastName,emp_fname AS FirstNameFROM Employees;SELECT Surname, GivenNameFROM Customers;SELECT Surname, GivenNameFROM Contacts;END IF