IntermediateBasic SELECT
Drop table safely
The query
SQL
DROP TABLE IF EXISTS old_logs CASCADE;Note
“CASCADE automatically drops objects that depend on the table (like views). IF EXISTS prevents errors if table is gone.
DROP TABLE IF EXISTS old_logs CASCADE;Note
“CASCADE automatically drops objects that depend on the table (like views). IF EXISTS prevents errors if table is gone.