How to delete all rows data from database

Hello All.
I have a database username 'abc'. This database contain 123 tables & have many data.
I want to empty all the database. Is it possible that clear all the database with a single query.
if yes then kindly tell me about the query .
Thanks
Diamond

Keep in mind that you cannot rollback the truncate command.
Once you truncate a table all of it's data AND statistics are gone.
If you do not want to use PL/SQL to delete all rows you can generate a script by SQL
SCOTT@ORCL> SELECT ' TRUNCATE TABLE '|| TABLE_NAME||';' FROM USER_TABLES;
'TRUNCATETABLE'||TABLE_NAME||';'
TRUNCATE TABLE BONUS;
TRUNCATE TABLE SALGRADE;
TRUNCATE TABLE DEPT_LOV;
TRUNCATE TABLE TITLE;
TRUNCATE TABLE TEST_DATE;
TRUNCATE TABLE DEPT;
TRUNCATE TABLE REP;
TRUNCATE TABLE REP_PARAM;
TRUNCATE TABLE EMP;
10 rows selected.
SCOTT@ORCL> SELECT 'DELETE FROM '|| TABLE_NAME||';' FROM USER_TABLES;
'DELETEFROM'||TABLE_NAME||';'
DELETE FROM BONUS;
DELETE FROM SALGRADE;
DELETE FROM DEPT_LOV;
DELETE FROM TITLE;
DELETE FROM TEST_DATE;
DELETE FROM DEPT;
DELETE FROM REP;
DELETE FROM REP_PARAM;
DELETE FROM EMP;
10 rows selected.
SCOTT@ORCL>You can save the output in a .sql file and run it.
Regards,
Tony

Similar Messages

  • How to delete backend system data from GRC,GRC 10 AC

    Hello experts,
    we have connected multiple ECC systems to GRC by creating connectors with respect to each system and
    currently we are using,now due to some reasons customer requested to delete complete data from
    one of the ECC system from GRC.
    we are using only access control with all components
    please  suggest how to delete all relevant data
    from GRC system
    Thanks
    GRC Admin

    Hi,
    You can use program GRAC_DELETE_ACCESS_RULES to achieve your requirement.
      2075597 - How to delete specific system from SPRO
    Regards,
    Madhu.

  • How do I delete all my data from computer mac?

    how do I delete all my data from computer mac?

    The Startup Manager may be necessary if the 'C' key fails:
    Use the Option key, when possible instead of 'C' key to boot discs

  • HT201269 How can I delete all my data from former Iphone 4 for future sale on Ebay?

    Hello!
    I've just purchased an Iphone 5 from a new carrier. Now I should like to sell my former Iphone 4 but, obviously, removing all my personal data (contacts, photographs, etc.) .  How can I transfer the ringtones that I purchased from by Iphone 4?
    How can I do it? Thanks in advance.
    Regards,
    Maria

    backup the device and restore it as new.
    If you already have or don't need a backup:
    Erase your device
    Erasing all content and settings will delete all the data from your device, including songs, videos, contacts, photos, calendar information, and any other data. All device settings are restored to their factory condition.
    To remove all settings and information from your device, tap Settings > General > Reset > Erase All Content and Settings. For more information about this feature, see iOS: Understanding 'Erase All Content and Settings'.
    If you are unable to erase your device, restore the device using iTunes.
    See: http://support.apple.com/kb/HT4137  for the exact steps.
    Transferring ringtones isn't supported, as far as I know...

  • HT204085 How can we delete all the data from iphone keychain of all the apps?

    Is it possible to delete all the data from keychain? Cleaning keychain, which delete all the item stored in keychain of all the applications on iDevices. Programatically can we do it?

    Depends whether you have selected Lock when Full or Wrap when Full for the Buffer Mode. If you have selected Lock When Full, the capture will stop when the the buffer is full. You can then Save the Buffer and download it in the form of sniffer file and start you capture again. This will over write the old data. If you have selected Wrap when Full, then it will continue the capture when the buffer is full. The oldest packets are discarded as new packets arrive.

  • How to delete the duplicate data  from PSA Table

    Dear All,
    How to delete the duplicate data  from PSA Table, I have the purchase cube and I am getting the data from Item data source.
    In PSA table, I found the some cancellation records for that particular records quantity  would be negative for the same record value would be positive.
    Due to this reason the quantity is updated to target but the values would summarized and got  the summarized value  of all normal and cancellation .
    Please let me know the solution how to delete the data while updating to the target.
    Thanks
    Regards,
    Sai

    Hi,
    in deleting the records in PSA table difficult and how many you will the delete.
    you can achieve the different ways.
    1. creating the DSO maintain the some key fields it will overwrite the based on key fields.
    2. you can write the ABAP logic deleting the duplicate records at info package level check with the your ABAPer.
    3.you can restrict the cancellation records at query level.
    Thanks,
    Phani.

  • How to delete the Hierarchy data from Infoobjects.

    How to delete the Hierarchy data from Infoobjects. In my case I had 300 records in the corresponding table of info object.
    When i was trying to delete the hierarchy data, I am getting error message. "Some master data not deleted". Can any one tell me to delete all these records by using a program.

    Hi
    Go to SE11 and enter the hierarchy table name.
    /BIC/H....(infoobject name)...and execute the table and select table entry and delete all....
    Thanks
    TG

  • How can delete my iphone5 data from the date its restored?

    how can delete my iphone5 data from the date its restored?

    it's unclear what you mean
    if you wish to remove your iphone5 data you connect it to iTunes on the computer and click the restore button and choose restore to factory defect

  • All the data on my Ipad3 is wiped out. is it possible to delete all the data from my ipad if somebody knows icloud-ID and password

    All the data on my Ipad3 is wiped out. is it possible to delete all the data from my ipad if somebody knows icloud-ID and password

    It sounds like a remote erase was sent via 'Find My Mac', to check please go to www.icloud.com and login. Is there any data there?
    If it was a remote erase only someone who had the ID and password could have done it. And in that case the data is gone, it is not recoverable I'm afraid.

  • How many method can pass data from Database to front-end(aspx)?

    How many method can pass data from Database to front-end(aspx)?
    By using ajax, I want show some data to aspx or html
    Here is one of these method,
    HTTP Handler(ashx):
    we can json data, use HTTP Handler pass data to front-end
    And can we do this by other method? Web API? or some fancy way?
    Thanks for any reply

    Hello TaiwanWei,
    Try forums.asp.net.
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I deactivated my apple id and want to add another id to my icloud acc,how can I do this without deleting all my data from my ph?

    There is an option to delete the account, but then it says it will delete all my data, which I dont want to happen.

    When you delete icloud account off your phone it will ask you if you want to keep or delete the data. You will choose to keep and will be ok. The only thing that will reset is photostream, so if that is a concern, back up your pictures.

  • How to delete a single data from table using control file

    I want delete a single row data from table using sql loder control file
    Edited by: 977940 on Dec 19, 2012 9:00 PM

    977940 wrote:
    I want delete a single row data from table using sql loder control file
    Edited by: 977940 on Dec 19, 2012 9:00 PMWhy?
    And how do you imagine this happening with sqlloader?
    The entire purpose of sqlloader is to load data (hence, the name sql*loader*) into a table from an external source. If you want to delete rows from a table, you use the sql DELETE statement.
    What is the business problem you are trying to solve?

  • How to erase all my data from MacBook Pro 10.8.3?

    I want to sale my Mac so I want to erase all my data from it. My mac has not got and dvd for it system. I affraid if I earse the data the OS also delated and not to oprate.
    I t would be very nice of you to help me.
    regardds

    You erase everything and put the factory operating system back on from the Internet Recovery (command option r held at boot time),
    If the factory operating system was 10.6, 10.5 or 10.4, then you put 10.6. using the disks.
    How to reformat a used Mac
    How do I securely delete data from the machine?

  • How to delete all my files from my Mac?

    Can anyone help me, how do I delete all my files from my Mac?

    If you want to eventually sell or give away your Mac, follow the below steps to prepare it.
    If your old Mac shipped with Lion or Mountain Lion, boot into Internet Recovery by holding down Cmd-opt-r on restart. When it boots, select Disk Utility and erase the Macintosh HD volume, then reinstall the OS. It will install the OS the Mac shipped with.
    If it shipped with Snow Leopard, boot from the original install disk and select Disk Utility from the Utilities menu which you will see after selecting the Language. From there, select the Hard drive device (top of the list), and click on the Partition tab. Set it to 1-partition, give the new volume a name (Macintosh HD), and click Apply.
    If you just want to get rid of the data off the Mac, create a new Admin user account, log into it, then delete your user account from the Users & Groups system Prefs. It will ask if you want to keep or delete the home folder.

  • How can i get the data from database & add them as a link

    Hi,
    how can i get a data from a database(DB2) and that data will be having a file so i should make them as a link.i tried it in jsp .
    <%
    Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
    Class.forName("COM.ibm.db2.jdbc.net.DB2Driver");     
    response.setContentType("text/html");
    Connection conn = null;
    conn = DriverManager.getConnection("jdbc:db2:spintran");
    Statement stmt = conn.createStatement();
    stmt.executeQuery("set current schema tut");
    ResultSet rs = stmt.executeQuery("select * from tutorial");     
    %>
    Type Of the Category : &nbsp&nbsp&nbsp
    <%
         while (rs.next())
         String desc = rs.getString(1);     
         out.println(desc);
    %>
         <A HREF = "<%=desc%>"><%=desc%> </A>
         <%
         %>
    but it is not working.how can i link.
    thank you.

    what is desc? is it the file name ? whats the data type of desc in db? INFILE?
    if desc is just the name of the file, then make sure that such a file exists in the proper folder.only then the link works..
    that is, if desc is 'a.jpg' then a.jpg should be existing in the same folder as your html is.

Maybe you are looking for