Hi,
in SQL 6.5 is there a way to delete all record in a table (using
DELETE * FROM or TRUNCATE) regardless of the foreign keys ?
I want to delete some tables WITHOUT CHECK of the foreign keys !!
Thakns
Thakns
You can check whether the SQL Server 6.5 ALTER TABLE command has an option
to disable FOREIGN KEY constraints ... I don't believe it does, but I
haven't used SQL Server 6.5 in a long time.
Other than disabling the constraint, if it is supported in SQL Server 6.5,
or dropping the constraint, there is no way to delete rows regardless of the
FOREIGN KEY constraint. To do so, would undermine the very purpose of
establishing a FOREIGN KEY constraint in the first place.
-------------------------------------------
BP Margolin
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
can be cut and pasted into Query Analyzer is appreciated.
Quote:> Hi,
> in SQL 6.5 is there a way to delete all record in a table (using
> DELETE * FROM or TRUNCATE) regardless of the foreign keys ?
> I want to delete some tables WITHOUT CHECK of the foreign keys !!
> Thakns
1. delete primary key records together with the foreign keys records
How can i delete the foreign key records in Table2 when i delete it's
Primary key on Table1?
Edwin
2. Oracle SQL/PLUS Functional Authority, Airline Systems, UK
3. error in deleting a record which is foreign key
4. ADO connection to Tandem NonStop SQL server
5. Trigger to check a foreign key without using foreign key
6. Snapshots and Merge Replication
7. Help: Can anybody tell me what happened to TSEQUAL()
8. foreign key w/o foreign/primary key
9. Poor delete performance when table is referenced by a foreign key
10. Disabling foreign key constraint for delete only
11. Delete Triggers and Foreign Keys??
12. How to know if Delete statement will fail (foreign key constraint)