Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete from Inner Join
Message
 
À
16/01/2013 15:12:40
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01563007
Message ID:
01563011
Vues:
45
>I have a need to delete from a inner join.
>
>This is the original SQL command:
>
>
>SELECT * FROM ListMemberField
> INNER JOIN ListField ON ListMemberField.NoListField=ListField.Numero
> WHERE ListField.NoList=143
>
>

What is a primary key you can identify records by?

Delete from mytable where primarykey in (Select primarykey from listmemberfield inner join listfield on ListMemberField.NoListField=ListField.Numero
WHERE ListField.NoList=143
)

>This gives 22 records.
>
>I basically need to delete those 22 records by adjusting the SQL command for a delete syntax.
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform