MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Mike Blezien Date:July 24 2004 3:19pm
Subject:Query Possible
View as plain text  
Hello,

MySQL version 4.0.20

I'm trying to figure out, if it's possible to do, with one query to update a 
single table.

Query #1
select m.memid from members m left join active a
on a.memid = m.memid where a.acct_days > 0 and m.account = 1;

Query # 2
update members set account = 2 where memid in (results from query #1)

Can this all be done in one sql statement, in query 2?

TIA

Mickalo




Thread
Query PossibleMike Blezien24 Jul
  • Re: Query PossibleMichael Stassen24 Jul
  • Re: Query PossibleMike Blezien24 Jul