lemarsu Posted April 6, 2003 Share Posted April 6, 2003 I have written some SQL but it would not work under mysql (in the office DB2 and oracle are ok with this kind of sql) the following sql is what I am trying to run : UPDATE tableA, tableB SET tableA.usergroupid=8 WHERE tableB.userid= tableA.userid AND tableB.country= \'United Kingdom\' AND tableA.usergroupid=\'5\' Can anyone please help.... Thanks LeMarsu Quote Link to comment https://forums.phpfreaks.com/topic/311-update-from-field-in-other-table/ Share on other sites More sharing options...
Kriek Posted April 8, 2003 Share Posted April 8, 2003 Starting with MySQL Version 4.0.4, you can also perform UPDATE operations that cover multiple tables You need MySQL 4.0.4 to perform the query [link] Quote Link to comment https://forums.phpfreaks.com/topic/311-update-from-field-in-other-table/#findComment-1039 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.