Re: how to boost drop table statement



> You could try to TRUNCATE the tables first, but then they must not have
> foreign key constraints.

You just have to do them in the correct order (assuming no recursive
constraints).

<plug>
SchemaSpy grew out of a tool that I wrote to determine that order.
It'll generate insertion order and deletion order lists of tables that
are intended to be used by load/purge scripts.
</plug>

John
http://schemaspy.sourceforge.net

.



Relevant Pages

  • Re: Truncate table being referenced by a foriegn key
    ... First you have to drop the foreign key constraints ... "Abhishek Srivastava" wrote in message ... > When I try to truncate the tables in my database I get error message> ... > Cannot truncate table 'bt_Bug' because it is being referenced by a> FOREIGN KEY constraint. ...
    (microsoft.public.sqlserver.programming)
  • Re: Truncate table being referenced by a foriegn key
    ... First you have to drop the foreign key constraints ... "Abhishek Srivastava" wrote in message ... > When I try to truncate the tables in my database I get error message> ... > Cannot truncate table 'bt_Bug' because it is being referenced by a> FOREIGN KEY constraint. ...
    (microsoft.public.sqlserver.programming)
  • Re: Identity
    ... If you also want to remove data, you can use TRUNCATE table as long as the ... table has no foreign key constraints. ... SQL Server MVP ... > How do you reset or reseed the IDENTITY column? ...
    (microsoft.public.sqlserver.programming)
  • Constraints
    ... Can any one tell me regarding the foreign key constraints like I wanna ... findout which columns doesn't contain the foreign key constraint so that I ... Prev by Date: ...
    (microsoft.public.sqlserver.clients)