Hi
does sql server v2000 allow you to specify a delete with
cascade option similar to Oracle (oops) when removing all
rows from a given table or do you have to either drop the
constraints or remove data from the child tables prior to
the delete on the parent table? I do not want to use the
truncate command if possible.
Cheers
GCH| does sql server v2000 allow you to specify a delete with
| cascade option
--
Yes. In the Create Relationship dialog box, there is a checkbox labeled
"cascade delete related fields." This option "instructs the database to
delete corresponding rows from the foreign key table whenever rows from the
primary key table are deleted.
My reference: SQL Server Books Online
Hope this helps,
--
Eric Cárdenas
SQL Server support|||Hello, GCH.
MS SQL Server 2000 suports ON DELETE CASCADE option.
Here is the example:
CREATE TABLE NewOrderDetails
(
OrderID int NOT NULL
CONSTRAINT FK1_NewOrderDetails REFERENCES Orders
(OrderID)
ON DELETE CASCADE
)
I hope this could help you.
"GCH" <anonymous@.discussions.microsoft.com> wrote in message
news:007f01c3bed2$4b982e60$a001280a@.phx.gbl...
> Hi
> does sql server v2000 allow you to specify a delete with
> cascade option similar to Oracle (oops) when removing all
> rows from a given table or do you have to either drop the
> constraints or remove data from the child tables prior to
> the delete on the parent table? I do not want to use the
> truncate command if possible.
> Cheers
> GCH
Showing posts with label removing. Show all posts
Showing posts with label removing. Show all posts
Monday, March 19, 2012
Wednesday, March 7, 2012
Delete/cleanup Replication
How do I cleanup/delete all the tables, views and stored
left behind after removing replication from a database?
Thanks
Emma
http://communities2.microsoft.com/co...0-cd01a34faf12
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
|||Emma,
sp_removedbreplication is the 'official' way to do this, but as you may
find, some system data may remain, hence Hilary's script and some others.
Regards,
Paul Ibison
left behind after removing replication from a database?
Thanks
Emma
http://communities2.microsoft.com/co...0-cd01a34faf12
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
|||Emma,
sp_removedbreplication is the 'official' way to do this, but as you may
find, some system data may remain, hence Hilary's script and some others.
Regards,
Paul Ibison
Subscribe to:
Posts (Atom)