Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003

    Unanswered: Dropping Tables in ASP

    I all ready have a connection open to a database. I know I have write access to it, because I've ran a Select INTO query and it populated the table. What I'm needing to do it delete the table. I know the command is DROP TABLE <table_name> but that doesn't work. It throws me out of my program. Any help would be appreciated.


  2. #2
    Join Date
    Mar 2006
    south jersey, usa

    Sometimes we wish to get rid of all the data in a table. One way of doing this is with DROP TABLE, which we saw in the last section. But what if we wish to simply get rid of the data but not the table itself? For this, we can use the TRUNCATE TABLE command. The syntax for TRUNCATE TABLE is

    TRUNCATE TABLE "table_name"

    So, if we wanted to truncate the table called customer that we created in SQL CREATE, we simply type,

    TRUNCATE TABLE customer
    "They say Moses split the Red Sea
    I split the blunt and rolled the fat one, I'm deadly"
    -- Tupac 'Blasphemy'

  3. #3
    Join Date
    Aug 2006
    San Francisco, CA
    You might not have DROP access. Just because you can SELECT, UPDATE, INSERT, and DELETE from a table doesn't mean you can DROP the table.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts