> -----Ursprungligt meddelande-----
> Från: rob anderson [mailto:[EMAIL PROTECTED]]
> Skickat: den 16 juli 2001 14:14
> Till: [EMAIL PROTECTED]
> Ämne: DELETING items
>
>
> I am trying to delete records from a table, where the 'id' to be
> deleted should only happen if a certain flag (status) exists.
>
> The table contains one or more records for the same id, only the
> flag changes.
>
> I have tried
>
> create temporary table temp (id int not null);
>
> select id from tracking where tracking.status = 5;
>
> delete from tracking
> where id = select temp.id from temp;
sub queries are not yet implemented in MySql, but will be in 4.0...
> drop table temp;
>
> But this fails.
>
> I am not a SQL guru, and would appreciate any help
>
> Rob
>
Regards,
Johan Nilsson
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php