OVH Cloud OVH Cloud

sql

2 réponses
Avatar
arnaud
bonjour,

Pouvez m'aider a trouver la bonne syntaxe sql pour ce besoin :
delete from table2 where table1.champ=table2.champ et table1.num=6

merci

arno

2 réponses

Avatar
arnaud
pour info,

DELETE Tbl1.* FROM Tbl1 WHERE (([NomChamp] In (select NomChamp from Tbl2)));

"arnaud" a écrit dans le message de news:
chhmr2$9cd$
bonjour,

Pouvez m'aider a trouver la bonne syntaxe sql pour ce besoin :
delete from table2 where table1.champ=table2.champ et table1.num=6

merci

arno






Avatar
Pascal Belaud [MS]
Bonjour,

D'après ce que j'ai compris de ta requête, cela serait plutôt:
"Delete From Table2 Where Table2.Champ In (Select Table1.Champ From Table1
Where Table1.Num = 6)"

Mais j'ai peut-être aussi mal compris.

A bientôt,

--
Pascal Belaud - Microsoft France
OlyMars: SQL Server Centric .NET Code Generator

http://www.microsoft.com/france/msdn/olymars
http://www.olymars.net/latest.zip (interim build)
http://blogs.msdn.com/olymars


"arnaud" wrote in message
news:chhovn$a4i$
pour info,

DELETE Tbl1.* FROM Tbl1 WHERE (([NomChamp] In (select NomChamp from


Tbl2)));

"arnaud" a écrit dans le message de news:
chhmr2$9cd$
> bonjour,
>
> Pouvez m'aider a trouver la bonne syntaxe sql pour ce besoin :
> delete from table2 where table1.champ=table2.champ et table1.num=6
>
> merci
>
> arno
>
>
>
>