sql - MYSQL nested query newbie question -


i trying increment 'sellingdate' field that's in 'company' table.

update company     set sellingdate = ((select date_add((select sellingdate                                            company                                           cid = '35'), interval 1 day)))   cid = '35'; 

this query gives me error saying:

error code: 1093
can't specify target table 'company' update in clause

what doing wrong here?

use:

update company     set sellingdate = date_add(sellingdate, interval 1 day)  cid = '35' 

mysql doesn't allow subquery in update statement against same table, subquery unnecessary example. odd reason self-join in update statement won't return 1093 error though it's same logic.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -