SQL Question

From: Date: Fri, 13 Oct 2000 15:11:26 +0000
Subject: SQL Question
Groups: php.db 
Request: Send a blank email to php-db+get-3592@lists.php.net to get a copy of this message
Hi everybody, I've got just a quick question to you all who are familiar with SQL. I don't know how to select records, which are in one table and not in another one. In other terms, I want to select records which are not present in both tables depending on one field. For example : Table 1 +---------+-----------+ + Login + Password + +---------+-----------+ + steph + toto + + yann + titi + +---------+-----------+ Table 2 +---------+-----------+-------------+--------------+ ... + Login +first name + second name + Address + ... +---------+-----------+-------------+--------------+ + steph + xxxxxx + yyyyyyyyyy + zzzzzzzzzzzzz + + isab + xxxxxx + yyyyyyyyyy + zzzzzzzzzzzzz + +---------+------------+------------+--------------+ I'd like to find a SQL statement to delete the second row (isab) from Table 2 depending on the login field. Could anyone help please ? Thanks Stéphane Stéphane Cesbron Chargé du développement Internet/Intranet AUDENCIA Nantes.Ecole de Management 8 route de la Jonelière B.P. 31222 44312 Nantes Cedex 3 Tél : 02.40.37.34.47

« previous php.db (#3592) next »