MySQL Forums
Forum List  »  Newbie

My update statement cannot excute
Posted by: CALVIN WONG
Date: February 06, 2022 08:00PM

Hi,

I have following statement tested in MS SQL is OK, but error where apply to MySQL in myPHPadmin:

---
update `db31_posts` SET post_name = nn.newname

FROM

(select postid,newname FROM newname) AS nn

WHERE `db31_posts`.`ID`= nn.postid
----

Error is :
----
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM

(select postid,newname FROM newname) AS nn

WHERE `lsbBo6FH_posts`.`ID' at line 3
-----

Is something differnt between MSSQL and MySQL ?
Thanks

CW

Options: ReplyQuote


Subject
Written By
Posted
My update statement cannot excute
February 06, 2022 08:00PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.