davewatts Posted October 21, 2003 Share Posted October 21, 2003 This is my first time on the forum and I\'m looking for some kind person to help me. I have developed some SQL that works in both MS SQL Server and in Sybase. This code has been migrated to run on Mysql and it fails a syntax check. I have had a look at the manual as regards the syntax for the UPDATE statement and it would appear that you cannot have a FROM clause joining two table. Could you let me know if this is true or if there is a method of how to achieve this without using a from clause. update player set POINTS = 3 FROM Player AS PP, Matches AS M WHERE M.GAMEID = PP.GAMEID and M.MATCHID = PP.MATCHID and M.RESULTIND = PP.RESULTIND and PP.IND = \'N\' Quote Link to comment https://forums.phpfreaks.com/topic/1200-update-statement-using-more-than-1-table/ Share on other sites More sharing options...
DylanBlitz Posted October 21, 2003 Share Posted October 21, 2003 depends on the version of mysql. With mysql 4.0.4 and newer you can, older ones have to have seperate update statements. Check this out http://www.mysql.com/doc/en/UPDATE.html Quote Link to comment https://forums.phpfreaks.com/topic/1200-update-statement-using-more-than-1-table/#findComment-4020 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.