Skip to main content

Delete all tables of a database


Below SQL select statement create list of SQLs to delete all tables

For ORACLE schema

SELECT 'DROP TABLE "' || TABLE_NAME || '" CASCADE CONSTRAINTS;' FROM user_tables;



For MSSQL schema


use [database_name]
SELECT 'DROP TABLE {user}.' + NAME FROM sys.objects where type = 'U';

Where {user} is the owning user of the tables.






(drop all tables of database)

Comments

Popular posts from this blog

Best freeware - XML editor

As a software developer, I open XML files all the time. I a heavy commercial XML editor. But nothing can compare to a small, thin and free XML editor like 'foxe'. A great feature is has is the alignment of long XML strings to readable XML format (Shift-F8). It help lot of times when the XML file was generated by some tool and was not readable. Homepage: http://www.firstobject.com/dn_editor.htm

SSL in pictures

Here is my summary on SSL (or as I like to call it 'SSL for dummies')

Jenkins error: groovy.lang.MissingPropertyException

I tried to run groovy build step and got below error. This post will describe how I solved the problem. Caught: groovy.lang.MissingPropertyException: No such property: hudson for class: script