On Wed, 28 Mar 2001, Grahame Kelly wrote:
mysql does not support many things, this is one of them.
ie nested selects..
/Torqumada
> Hi all.
>
> I have a table called password which has:
>
> Field Type
> uname varchar(64) Key
> passwd varchar(16)
>
> and another table user (partly shown) which has:
>
> Field Type
> uname varchar(64) Key
> status varchar(64)
> total varchar(64)
>
> and I am wishing to delete all users from passwd
> where user.status = "old".
>
> I have tried the following which according to MySQL
> manual should work (Deleting Rows from Related Tables).
>
> delete FROM password WHERE password.uname IN
> (select uname FROM user WHERE status = "old");
>
> Can anyone offer some assistance.
>
> Thanks, Grahame
Paladin Corporation Pty Ltd. Ph:+612 9835-4782 Fax:+612 9864-0487
Software Engineering: c/c++/perl/sql/eiffel/pascal/haskell/php/java
Powered by FreeBSD/SMP http://www.paladincorp.com.au/
The lyf so short, the craft so long to lerne - Chaucer
Unix, VMS, MVS since the 80's, FreeBSD from 2.1.6, Linux since '94
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug