Jump to content

Update Statement using more than 1 table


davewatts

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.