Jump to content

Archived

This topic is now archived and is closed to further replies.

davewatts

Update Statement using more than 1 table

Recommended Posts

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\'

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.