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.
For examples, use the Sybase IQ demo database iqdemo.db.
IF EXISTS( SELECT * FROM SYSTAB WHERE table_name='Employees' )THEN SELECT Surname AS LastName, GivenName AS FirstName FROM Employees; SELECT Surname, GivenName FROM Customers; SELECT Surname, GivenName FROM Contacts;ELSE MESSAGE 'The Employees table does not exist' TO CLIENT;END IF