Script that deletes all the data in the DB

Somebody has or know a script that delete all the data (but not the tables) of the database???? I have dummy data and know I need the tables clean of data.
How can I delete it???????? Thank you for you help
Javier

You could truncate all the tables with the following commandTRUNCATE TABLE <table_name>;This will delete all the data in the table while keeping the table structure, contraints, indexes, triggers, etc. intact so they wont have to be rebuilt. All foreign keys must be disabled to use the TRUNCATE command.

Similar Messages

  • I had to change my apple ID now how do I update icloud without deleting all cloud data on the computer?

    My provider is terminating email service so I had to change my apple ID.  I did that in iTunes but now my icloud on my PC wants me to sign in under my old id, I don't see a way to update to the new ID without deleting all cloud data on the PC.  Is there another way so I don't have to resync everything from the cloud?

    Check the list in the link below, how to change all services, after you changed your Apple ID:
    What to do after you change your Apple ID email address or password - Apple Support
    https://support.apple.com/en-us/HT204071
    In particular, for iCloud:
    Update your Apple ID or password on your iPhone, iPad, iPod touch, Mac, PC, and Apple TV.
    iPhone, iPad, and iPod touch
    Go to Settings > iCloud.
    If you're signed out, enter your updated Apple ID or password. The data in iCloud will automatically appear on your device after you sign in.
    If you're still signed in with your previous Apple ID:
    Scroll down and tap Sign Out, then tap Sign Out to confirm. If you're using iOS 7 or earlier, tap Delete Account, then tap Delete to confirm. You might need to enter your password. Your data will remain in iCloud and will be updated on your device when you sign in to iCloud again.
    Enter your updated Apple ID or password.

  • How do i delete all my data from the ipad 4 from my PC?

    I know what my password should be but when I made it I guess I put it in wrong. so basically, I don't know my password. I tried putting it in but now everything is disabled and it says "connect to itunes" . now I just want to restore it but  everytime I try restoring it, it says "The iPad software update server could not be contacted." "Make sure your network settings are correct and your network connection is active or try again later." This happened last night and ive tried about 30 times. the method I have been using is disconnecting the USB, turning the iPad off, then turning it back on while the USB is plugged back in. After that it says "connect to itunes" on the iPad. So what should I do now? I just got it for Christmas and I don't mind all the data being erased cause its not hard to put back on. so PLEASE just tell me how to do it. I also never synced it to my computer. so PLEASE PLEASE PLEASE PLEASE PLEASE help me! And if you could tell me, how much would it cost to bring it into apple and they unlock it for me? id rather not do this, but if I have no choice, I will.
    PLEASE PLEASE PLEASE AND THANK YOU!!!!!!! :S
    #PLEASEHELP

    For more secure reason, I'd suggest to double check whether the data is removed cleanly with Erase All Content and Settings. The data is still recoverable as my pass experience. And no all devices are capable of using this method. Privacy is much more important. I highly recommend this method instead to permanently delete everything on your iPad by overwriting random digits to existing data. And there is no chance to get those data back.

  • I was given the wrong macbook when I gave mine in for repair.  I want to complain.  Also, they wiped ALL my data off the hard drive.  I want to complain to someone in authority.  How?

    I am extremely disappointed and angry with Apple service.  I am a writer and booked three weeks in Spain so that I could finish my book.  On the second day my laptop cut out on me asI was working on it, so I took it to Goldenmack in Cadiz.  Not only was I given someone else's macbook when I went back to collect it, but then when I returned to the UK, the Apple shop in Brighton managed to delete ALL my data from the hard drive because I was unlucky enough to get a trainee on her first day.  I have since learned she should not have deleted my data without even running a diagnostic.  She told me she was going to 'restore' the drive.  I took this to mean she was going to restore my work.  But no!  She erased the lot.
    I complained and eventually was put in touch with a supervisor, who I was told  had authority to resolve the issue. She said she would get the shop to phone me.  That was ten days ago and I'm still waiting. 
    Ok so there's nothing I can do now to get back the three chapters of my book that I have lost and didn't back up, but the  hard drive on this laptop is still faulty.  I try to back up my work every time I use the machine but as soon as I attach an external drive, the whole thing shuts down. I can't use it any more as I can't risk losing any more work.    This laptop is only just over a year old and this is just not acceptable, especially since I have really looked after it. 
    This is an appalling service I have encountered from Apple, and I am not going to ignore it.  I have contacted the young chap whose laptop I was erroneously given, and the repair of which I paid for! (although I did eventually get a refund),  to ask him if he had been given mine as well.  He said he had been completely unaware that his laptop had been given to me and he is furious as he had loads of "sensitive material" on it."  I have no idea in whose hands my laptop has been either, or indeed what damage it sustained while it was supposed to be in for repair.

    Contact Apple Support:
    http://www.apple.com/support/contact/
    Apple - How to Contact Us:
    http://www.apple.com/contact/
    Be sure to refer to the repair ticket number.
    Sounds like a terrible mixup.
    Good luck & happy computing!

  • I updated my iMac to Mountain Lion. All the files were deleted. I have Time Machine backups. When I restart the mac pressing Command R to restore from backup it shows the previous OS X (Leopard) beside the date of the backup. Will it go back if I restore?

    I updated my iMac to Mountain Lion. All the files were deleted. I have Time Machine backups. When I restart the mac pressing Command R to restore it from the backup it shows the previous OS X (Leopard) beside the date of the backup that I want to select. Will it go back to Leopard if I restore it from the backup?

    No, it won't revert to the prior OS X but you you may have third party apps installed that were compatible with Lion that may not be compatible with Mountain Lion.
    App Compatibility Table - RoaringApps - App compatibility and feature support for OS X & iOS
    After you restore from TM, check HD > Incompatible Software

  • Is it all the data on the iphone is deleted when iphone is in Recovery Mode?

    is it all the data on the iphone from the past is deleted when iphone is in Recovery Mode? or is there anyway i can manage the data from the past when my iphone is in Recovery Mode?  or is it when my iphone is in Recovery Mode, all the data from the past is clear and its all fresh disk like the new iphone? is there anyway i can still acess the old data on iphone in recovery mode?

    Depends. There is no supported method, from Apple, to exit recovery mode, other than restoring your phone. That, of course, means that all data on your phone gets erased. There are third-party utilities, like RecBoot, that claim to be able to get an iPhone in/out of recovery mode with the push of a button. You can search for these yourself.

  • When I plug in iPhone (5.1.1) to computer, playlists show up on the iPhone (when plugged in), that do not appear when it is not plugged in. And I can't erase them. I have iTunes match, and deleted all my music on the iPhone, but that had no effect.

    When I plug in iPhone (5.1.1) to computer, playlists show up on the iPhone (when plugged in), that do not appear when it is not plugged in. And I can't erase them. I have iTunes match, and deleted all my music on the iPhone, but that had no effect on the phantom playlist that shows up on the PC when I plug in the iPhone to the PC. I cannot manually move songs or playlists from the PC to the iPhone
    Help greatly appreciated.

    Unplug your Iphone out of your computer and replug it back in. It took me several times before I could do this

  • I cant seem to download and install the latest iphone software update. I have tried since the release and have been unsuccessful on more than 7 occasions and lost all the data on the process. Anyone have that problem an how do I fix this problem?

    I cant seem to download and install the latest iphone software update. I have tried since the release and have been unsuccessful on more than 7 occasions and lost all the data on the process. Anyone have that problem an how do I fix this problem?

    Hi
    Thanks but I have tried doing the above - when I said 7 times I was modest, its more like 15 times.
    And I am referring to the 5.1 software update. I dont have wifi so I guess I will have to try that seeing that my husband also has the same problem - he has also tried downloading several times. It always times out en says that the connection is lost but yet there are always an internet connection and a decent signal once it stopped. Think it said error 32052 or something!
    I am disappointed because the update includes inprovement on the battery life - did you guys notice any difference?

  • I got the new iPhone5 back in Dec, I hooked it up to my computer for the 1st time this wk.  It deleted all new data added since Dec (notes,contacts,texts,pics, info in apps) and reverted back to all my old data.  How can I retrieve all the lost data??

    I got the new iPhone5 back in Dec, I hooked it up to my computer for the 1st time this wk.  It deleted all new data added since Dec (notes,contacts,texts,pics, info added to apps) and reverted back to all my old data (literally uploaded all of my old texts and 1400 old pics and deleted anything new).  How can I retrieve all the lost data?? Please help!!

    SkyDaughter29 wrote:
    My current situation: I have soooo many texts on my iphone and I haven't deleted many because I need the information contained in them for future reference and for legal purposes.  I would really like to find a means and way to save them other than on the phone itself. I've done searches for various apps yet I'm not finding what I think I would need.  It appears Apple does not sync the texts between the iphone and my MacBook Pro.
    Try the computer apps PhoneView (Mac) or TouchCopy (Mac & PC):
    http://www.ecamm.com/mac/phoneview/
    http://www.wideanglesoftware.com/touchcopy/index.php
    Best of luck.

  • I recently transferred my ITunes library to an external hard drive.  I made sure to copy all the data from the saved location.  After the transfer I noticed that a lot of albums are missing the first song and some recently purchased albums are missing.

    I recently transferred my ITunes library to an external hard drive.  I made sure to copy all the data from the saved location.  After the transfer I noticed that a lot of albums are missing the first song and some recently purchased albums are missing.  Is there any way to recover the data?  Thanks for any help.

    I may have found an answer here:
    http://www.ilounge.com/index.php/articles/comments/moving-your-itunes-library-to -a-new-hard-drive
    They only thing I can assume is that my external hard drive was slow to start and iTunes defaulted to its old directory (see the last paragraph at the link above). However, once my external was recognized shouldn't everything have fixed itself?
    Message was edited by: williamson42
    Message was edited by: williamson42

  • I'm setting up my new iPhone and already have an iTunes account.  It's asking me if I would like to set up as a new iPhone, or Restore from the backup of my iTouch.  If i set up as a new iPhone will that delete all my music from my previous iTunes account

    I'm setting up my new iPhone and already have an iTunes account.  It's asking me if I would like to set up as a new iPhone, or Restore from the backup of my iTouch.  If i set up as a new iPhone will that delete all my music from my previous iTunes account?

    It will not do anything at all to your computer.

  • How do you disable the shortcut key in Mail that deletes all mail in the trash folder

    Is there a way to disable the shortcut key in Mail in Mountain Lion that deletes all mail in the Trash folder in all accounts: <shift><command><delete> ?
    I did it once by mistake and it deleted all my trash - it is very difficult to restore when there are thousands of messages in various emaiil accounts.
    Thanks

    While you can't (so far as I know) remove it - you can assign a different (& less likely to be used accidentally) one via System Preferences - Keyboard - Shortcuts.
    Go there, create a new one (or 2) for Mail only, and give it the exact name(s) if the menu item(s) in question, capitalisation & ... included.
    Below is on 10.6, but the idea's the same

  • I have an iphone  4 8gig there is 2.4 gig of "other" showing on my usage which is more than all oter data on the phone.  What is it and how do I delete some to clear space?

    I have an iphone 4 8gig there is 2.4 gig of "other" showing on my usage which is more than all other data on the phone.  What is it and how do I delete some to clear space?

    Sorry. We can't help you. It's no longer an iPhone. Apple won't touch it.
    Take it to whoever replaced the screen and see if they can help you.
    iPhones are not user servicable and Apple does not sell iPhone parts at all. I'd be surprised if you were actually able to back it up at this point. It sounds like it's completely borked.

  • My PC Harddrive died along with all the CD's that I have saved to the Itunes library.  My IPOD touch has the library still so I would like to send the data from the IPOD to the PC to restore my library.  Is this possible?

    My PC Harddrive died along with all the CD's that I have saved to the Itunes library.  My IPOD touch has the library still so I would like to send the data from the IPOD to the PC to restore my library.  Is this possible?

    Yes, by using a third-party utility such as Phone to PC or Phone to Mac.
    Also see How to dowload purchased music and Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • HT1212 Using the "if you have never synched with itunes" instructions, will I lose all data on the phone? That is the most important information, how to recover the data. The phone is fungible.

    Using the "if you have never synched with itunes" instructions, will I lose all data on the phone? That is the most important information, how to recover the data. The phone is fungible.

    Thanks @ KiltedTim, but losing "only" any data is really not acceptable and, in this case, the phone had not been backed up, but thanks for taking the time. Also, yes, fungible means what I think it means. An iphone is a completely substitutible commodity, unlike my data, so instructions that inform me as to how to fix a phone I could replace for a small sum of money while failing to address the more important issue of the data are almost useless - they potentially save me the $99 it would cost me to replace the phone if I were so inclined to trust another apple product. Not worth the hour it took to find them or the 35 minutes on the phone to confirm my suspicions about the data.

Maybe you are looking for

  • ITunes update  will not work on WIndows 7 PC

    I rec. a message for an iTunes automatic update. There was an error so I clicked try again. Then I got a message to try a manual update except now iTunes will not open. I then uninstalled it and tried to re-install but I get a message that MSVCR80.dl

  • Lightroom 3 asks for serial number launching in non-admin account

    The following information was provided by Carey Burgess (Adobe Employee): Does Lightroom 3 launch and work fine in an admin account, but when you launch the application in a standard (i.e. non-admin) account it asks for a serial number? If so, then i

  • Why won't Network load?

    When I click on the Network icon within System Preferences it just keeps telling me that it is uploading, but never does.  I don't have any recent backups, and would not know how to just reload (correct word?) just the Network icon anyway.  I do have

  • Problem accessing data from LoadVars

    Hello All, I posted a similar topic a little while ago, the problem was solved.... but I've decided to go back and rework my code because it was a mess and I needed to simplify it. Of course, now when I try to do a basic LoadVars(); I run into proble

  • Creating Draft in B1iSN from CSV file

    Hi All, I want to create Draft from CSV file wich I used to create AP Reserve Invoice. I had no problems with creatoing Reserve Invoice. Everything works fine. Now I want to create Reserve Invoice Draft so I added to xsl file <DocObjectCodeEx>22</Doc