Results 1 to 3 of 3

Thread: Delete a table

  1. #1
    Join Date
    May 2004
    Posts
    25

    Unanswered: Delete a table

    Hi,

    what is the fastest possible way to delete a big table? Is there something like "Truncate table" in SQL Server?

    Thanks
    DJ

  2. #2
    Join Date
    Mar 2004
    Location
    Oakland, CA, USA
    Posts
    26

    RE: Delete a table

    Hello Drahos,

    Sorry I don't know about SQL server. You mean delete all records from a table or eliminate that table from the database? You may try the statements below. Hope it will help.

    'Delete all records from a table
    DELETE * FROM tblName;

    'Delete a table from a database
    DROP TABLE tblName;

  3. #3
    Join Date
    May 2004
    Posts
    25
    Using SQL it is still very slow. That table has 600,000 records.
    If I deleted it as an object (Drop table) then I would have to delete all the relations that table have. I could do that, but I don't know how to define relations between tables using code (Visual Basic)

    DJ

Posting Permissions

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