delete all table oracle

Solutions on MaxInterview for delete all table oracle by the best coders in the world

showing results for - "delete all table oracle"
Stefano
11 Jun 2020
1BEGIN
2   FOR cur_rec IN (SELECT object_name, object_type
3                   FROM user_objects
4                   WHERE object_type IN
5                             ('TABLE',
6                              'VIEW',
7                              'MATERIALIZED VIEW',
8                              'PACKAGE',
9                              'PROCEDURE',
10                              'FUNCTION',
11                              'SEQUENCE',
12                              'SYNONYM',
13                              'PACKAGE BODY'
14                             ))
15   LOOP
16      BEGIN
17         IF cur_rec.object_type = 'TABLE'
18         THEN
19            EXECUTE IMMEDIATE 'DROP '
20                              || cur_rec.object_type
21                              || ' "'
22                              || cur_rec.object_name
23                              || '" CASCADE CONSTRAINTS';
24         ELSE
25            EXECUTE IMMEDIATE 'DROP '
26                              || cur_rec.object_type
27                              || ' "'
28                              || cur_rec.object_name
29                              || '"';
30         END IF;
31      EXCEPTION
32         WHEN OTHERS
33         THEN
34            DBMS_OUTPUT.put_line ('FAILED: DROP '
35                                  || cur_rec.object_type
36                                  || ' "'
37                                  || cur_rec.object_name
38                                  || '"'
39                                 );
40      END;
41   END LOOP;
42   FOR cur_rec IN (SELECT * 
43                   FROM all_synonyms 
44                   WHERE table_owner IN (SELECT USER FROM dual))
45   LOOP
46      BEGIN
47         EXECUTE IMMEDIATE 'DROP PUBLIC SYNONYM ' || cur_rec.synonym_name;
48      END;
49   END LOOP;
50END;
51/
52
Jenelle
08 Jul 2017
1DELETE FROM my_table;		-- all rows, commit needed
2TRUNCATE TABLE my_table;	-- all rows, no possible rollback
3DELETE FROM my_table WHERE my_id = 12345;
4DELETE FROM my_table WHERE my_id IN (SELECT id2 FROM my_table2);
5COMMIT;		-- don't forget it...
Ricardo
17 Aug 2019
1DROP TABLE customers PURGE;
queries leading to this page
drop table oracleoracle drop purgedelete tables in oracle sql developerpurge table data in oracle exampledelete all rows from table oracle sqlremove data from table oraclehow to delete rows in oracledelete records in table with where clause oraclehow to delete the table in oracleoracle db delete roworacle table delete row purgehow to delete a row in oracle tablesql delete from table oracledelete all from table oracleoracle sql delete tabledelete table oracle dbdelete all data table oracledelete all tables oracle sql developerhow to delete all tables in oracle with a single querydelete data in oracle tabledelete record from table oraclehow to delete a table in oracledelete rows from a select oracleoracle delete querydelete all records from oracle tableoracle delete all records in tabledelete table oracleoracle delete purgedelete in oracledelete table query in oracleoracle drop databasedelete rows oracleoracle sql drop rows in tableoracle delete statementsql delete contents from table oracleoracle sql drop rowsoracle how to delete tabledelete a table in oracle sql developerdrop all tables oracle slqdrop purge oracledelete blank rows in oracle sql table how to delete table sql oracleoracle database delete all datadeleting row in oracledelete row in oracle commandoracle sql developer delete data from tablesql oracle delete roworacle delete all rowshow to delete all tables in oracle sql developerdelete oracle tableoracle sql drop table purgedelete statement oracledelete all table oracle sql developerhow do i delete tables in oracle sql developerdrop table purge vs drop table oracleoracle how to delete all data from tabledelete a table sql oraclepurge table oracledelete table in oracledrop all tables oracle clientdelete rows table oracledelete elements form table in oracle sqldelete table qsl oracledrop in oracle sqldelete all table oracledelete record in oracle sqlhow to delete a record in oracle sqlpurge table sql oracleoracle sql delete roworacle delete tabledelete entry from oracle tableoracle drop table cascade purgedelete from table oracledelete oracle queryhow to delete a row from a table in oracle sqloracle sql delete rowsdelete from subquery oracledelete query and table lock oracledrop all database tables oracle sql developeroracle database uninstalloracle delete row tableoracle drop tableoracle with clause deletehow to delete rows in oracle sqldelet in oracleoracle sql force delete rowsoracle delete table in stored procedurehow to delete data in table oraclehow to delete row in oracledelete all thing in table in oracle sqldelete all tables from oracle databasedrop a table in oracledelete all tables from database oracleoracle database delete all tablesoracle sql drop table and all rowspurge data from table in oracle examplehow to delete all data in oracle table commanddrop all table oracleoracle delete from another tabledelete all table in oracledelete conten from table oracledelete table sql oracledelete sql statement oraclehow to delete all table data in oracleoracle sql developer drop all tablesdelet all table in oraclesql cascade constraints purgedelete all tables in oracle sql developerdropt table fordedelete table in oracledelete oracle sqlhow to delete a row in oracledelete record oracle dbdrop table rows oracledelele all tables records oracledelete a record from oracle tabledelete statement in oracleoracle sql remove tabledelete rows sql oraclehow to delete all table in oracleoracle db purge tablespaceremove rows sql oracledrop all table in oracleoracle delete all tables from databaseoracle remove all tableshow to remove data from oracle sqlhow to drop all the tables in oracle sqloracle drop every tabledelete records from table oraclesql rowcount delete oracledelete data oracle without subqueryoracle sql drop all rowdelete query in oracledelete table oracle sql developerdelete record from oracle tablehow to remove all bydefault table in oracle sql developeroracle sql deletedelete row in oraclewdrop all tables oracledelete a table in oracledelete all records froma table in oraclehow to delete data from a table in oracle sqlhow to delete table in oracledrop all tables in oracleoracle delete rowdelete row in oracledelete all table oracle