Re: Drop all user tables + ignore constraints
From: Aaron [SQL Server MVP] (ten.xoc_at_dnartreb.noraa)
Date: 08/06/04
- Next message: Hugo Kornelis: "Re: stored procedures & cursors"
- Previous message: Yannis Makarounis: "Bulk copy operations using SQLDMO"
- In reply to: dw: "Drop all user tables + ignore constraints"
- Next in thread: dw: "Re: Drop all user tables + ignore constraints"
- Reply: dw: "Re: Drop all user tables + ignore constraints"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 6 Aug 2004 11:02:32 -0400
Uh, how about drop database, re-create, and re-create the tables? This is
far easier to script out than dropping all those constraints and tables in
the right order.
-- http://www.aspfaq.com/ (Reverse address to reply.) "dw" <cougarmana_NOSPAM@uncw.edu> wrote in message news:uXAl1W8eEHA.2896@TK2MSFTNGP11.phx.gbl... > Hello, all. We need to drop all user tables in a SQL Server 2K database all > at once with a piece of code. However, many of the tables have foreign key > relationships, and it gives errors until we drop the constraints. Any way to > drop all constraints on all user tables, and then drop all user tables? > Thanks. > >
- Next message: Hugo Kornelis: "Re: stored procedures & cursors"
- Previous message: Yannis Makarounis: "Bulk copy operations using SQLDMO"
- In reply to: dw: "Drop all user tables + ignore constraints"
- Next in thread: dw: "Re: Drop all user tables + ignore constraints"
- Reply: dw: "Re: Drop all user tables + ignore constraints"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|