When generating scripts for objects in TOAD for ORACLE, there is an option to generate DROP statement which is great. The DROP statement works fine when the object actually exists but errors out when the object does not exist (as expected). Other Quest products “TOAD for SQL Server” handle it differently. They first check if the object exist and only run the DROP statement if the object actually exist. I wish TOAD ORACLE would also do the same thing as done by TOAD for SQL SERVER.
Script Generated by TOAD for SQL Server:
IF EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N’[dbo].[MY_VIEW]’))
DROP VIEW [dbo].[MY_VIEW];
Script Generated by TOAD for ORACLE:
DROP VIEW SCHEMA_NAME.MY_VIEW;