At 9:32 -0600 2/17/03, Mayo, Chuck wrote:
>Hi all,
>
>Just jumped on the list, hoping someone can give me a hand. The query below
>uses a join, I guess, to select records from table stat_1_1 based on
>information in table stat. I'd like to be able to turn this query into a
>delete query but only want records removed from stat_1_1. Can anyone tell me
>how? I must be missing something really obvious.
Replace SELECT DISTINCT with DELETE. :-)
You need MySQL 4.0.x for this to work. Probably at least 4.0.2.
>
>Thanks,
>Chuck Mayo
>
> SELECT DISTINCT
> stat_1_1.event_id
>
> FROM
> stat_1_1,
> stat
>
> WHERE
> stat_1_1.player_id=39
> && stat_1_1.stat_id = stat.id
> && stat.stat_group = "Individual"