Hi!
Is there any SQL command that allow me to delete records from a list of
tables?
Something like this: "Delete From Table1, Table2"
TIA
Jorge
JotaO wrote:
> Hi!
> Is there any SQL command that allow me to delete records from a list of
> tables?
> Something like this: "Delete From Table1, Table2"
> TIA
> Jorge
Answered in microsoft.public.sqlserver.programming
Please do not multi-post!
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
Showing posts with label hiis. Show all posts
Showing posts with label hiis. Show all posts
Sunday, February 19, 2012
Delete records from several tables at once
Hi!
Is there any SQL command that allow me to delete records from a list of
tables?
Something like this: "Delete From Table1, Table2"
TIA
JorgeJotaO wrote:
> Hi!
> Is there any SQL command that allow me to delete records from a list of
> tables?
> Something like this: "Delete From Table1, Table2"
> TIA
> Jorge
Answered in microsoft.public.sqlserver.programming
Please do not multi-post!
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--
Is there any SQL command that allow me to delete records from a list of
tables?
Something like this: "Delete From Table1, Table2"
TIA
JorgeJotaO wrote:
> Hi!
> Is there any SQL command that allow me to delete records from a list of
> tables?
> Something like this: "Delete From Table1, Table2"
> TIA
> Jorge
Answered in microsoft.public.sqlserver.programming
Please do not multi-post!
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--
Delete records from serveral tables at once
Hi!
Is there any SQL command that allow me to delete records from a list of
tables?
Something like this: "Delete From Table1, Table2"
TIA
JorgeNo. However, it's possible to speed up the process by using TRUNCATE
TABLE - as long as no foreign keys refer to these tables.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"JotaO" <antispam@.antispam.com> wrote in message
news:%23YKsGzLUGHA.1444@.TK2MSFTNGP11.phx.gbl...
Hi!
Is there any SQL command that allow me to delete records from a list of
tables?
Something like this: "Delete From Table1, Table2"
TIA
Jorge|||Hi
If there is a foreign key in Table2 referencing Table1 then you can enable
cascading deletes.
John
"JotaO" <antispam@.antispam.com> wrote in message
news:%23YKsGzLUGHA.1444@.TK2MSFTNGP11.phx.gbl...
> Hi!
> Is there any SQL command that allow me to delete records from a list of
> tables?
> Something like this: "Delete From Table1, Table2"
> TIA
> Jorge
>
Is there any SQL command that allow me to delete records from a list of
tables?
Something like this: "Delete From Table1, Table2"
TIA
JorgeNo. However, it's possible to speed up the process by using TRUNCATE
TABLE - as long as no foreign keys refer to these tables.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"JotaO" <antispam@.antispam.com> wrote in message
news:%23YKsGzLUGHA.1444@.TK2MSFTNGP11.phx.gbl...
Hi!
Is there any SQL command that allow me to delete records from a list of
tables?
Something like this: "Delete From Table1, Table2"
TIA
Jorge|||Hi
If there is a foreign key in Table2 referencing Table1 then you can enable
cascading deletes.
John
"JotaO" <antispam@.antispam.com> wrote in message
news:%23YKsGzLUGHA.1444@.TK2MSFTNGP11.phx.gbl...
> Hi!
> Is there any SQL command that allow me to delete records from a list of
> tables?
> Something like this: "Delete From Table1, Table2"
> TIA
> Jorge
>
Subscribe to:
Posts (Atom)