#1
  1. No Profile Picture
    chinnavi
    Guest
    Devshed Newbie (0 - 499 posts)
    i wanna delete TABLE DATA alone ..
    i have a table calles "OR11"..
    I wanna delete all the data ?
    i know there is DELETE FROM TABLE , sql is there .. but how to delete entire content?

    vijay
  2. #2
  3. No Profile Picture
    Deckard
    Guest
    Devshed Newbie (0 - 499 posts)
    I'm not shure I quite understand you, anyways, to delete all the contents of a table you do this if you have an "ID"-column: mysql> delete from <tablename> where id >= 1;

    That should do the trick, but be careful, this leaves NO data in the table. :-
  4. #3
  5. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,642
    Rep Power
    4476
    Yeah...not sure I'm following you either, but to add to what Deckard wrote:

    DELETE FROM table;
    --Deletes all data, but leaves table structure.

    DELETE FROM table WHERE [conditions]
    --Deletes any row matching conditions, but leaves table structure and remaining data.

    DROP table;
    --Deletes all data and deletes table structure

    DROP database;
    --Deletes all data and all tables and removes database from system.

    Substitute the appropriate tablenames and databasenames, of course...

    Clarify your question if none of these answered it.

    ---John Holmes...

    ------------------
    *************************************************************
    * The manual can probably answer 90% of your questions...
    *
    * PHP Manual. www.php.net/manual
    * MySQL Manual: www.mysql.com/documentation/mysql/bychapter
    *************************************************************

Similar Threads

  1. Replies: 3
    Last Post: February 11th, 2004, 08:30 AM
  2. Will table size affect data retrival time?
    By abones in forum Oracle Development
    Replies: 1
    Last Post: February 10th, 2004, 08:55 AM
  3. output data to table
    By phpfan in forum PHP Development
    Replies: 2
    Last Post: January 31st, 2004, 06:04 AM
  4. how to keep table on top, not centered??
    By vinyl in forum HTML Programming
    Replies: 2
    Last Post: January 20th, 2004, 06:19 PM
  5. How to Extract data from html table?
    By zlozi in forum PHP Development
    Replies: 4
    Last Post: January 17th, 2004, 07:43 AM

IMN logo majestic logo threadwatch logo seochat tools logo