How can we write a SQL statement to drop a table. The drop statement should not generate any error if the table doesn't exists. I have achieved the same in Oracle by catching the 'table not found exception'
The code I wrote is as follows:
CREATE PROCEDURE drop_table(pTableName VARCHAR2)
vCommand := 'DROP TABLE ' || pTableName || ' CASCADE CONSTRAINTS';
EXECUTE IMMEDIATE vCommand;
WHEN table_not_exist THEN
WHEN OTHERS THEN
Can I do something equivalent in Sybase?