I'm wondering what is the best way to update one table based on another. Can joins be
performed for an update?
update table1 set table1.field2 = table2.field2 where table1.field1 = table2.field1;
The alternative seams to be:
select table2.field2 from table2;
update table2 set table2.field2 = $
;
Thanks for the help!
PS Though my searching i still have not found anything on IF statements in SQL... i'm
sure there is some, i just can't find any examples. Anyone give me one or two?
>>> Sinisa Milivojevic <[EMAIL PROTECTED]> 12/01/01 11:02am >>>
>Corey K
Looking though the docs. MySQL does not support nested selects but i'm looking for a
way to speed up my PHP.
This is what i have:
CREATE TABLE departmentuser (
userid int(10) unsigned zerofill default NULL,
departmentid int(10) unsigned zerofill default NULL,
KEY userid_departmentid(useri
Can you rename a database? If so, how does it handle all the tables inside it?
Thanks.
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
I'm writing a web application for a client in PHP. One function that a user can
perform results in a very expensive update. To try and speed up this process (free up
the user) i wrote a Perl script that performs the bulk of the work. When the user
runs the PHP page, the PHP page updates one