sql update__inner.sql

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql update__inner.sql相关的知识,希望对你有一定的参考价值。

-- update inner where

UPDATE business AS b
INNER JOIN business_geocode AS g ON b.business_id = g.business_id
SET b.mapx = g.latitude,
  b.mapy = g.longitude
WHERE  (b.mapx = '' or b.mapx = 0) and
  g.latitude > 0
  
-- http://stackoverflow.com/questions/8057565/mysql-update-statement-inner-join-tables  
-- update inner

UPDATE wifcms_mod_geodata__address as t2  
  INNER JOIN wifcms_mod_ads_areas_alias as t1 
	  ON t1.aa_id = t2.aa_id
SET t2.area_id = t1.area_id

-- http://dba.stackexchange.com/questions/21152/how-to-update-one-table-based-on-another-tables-values-on-the-fly

以上是关于sql update__inner.sql的主要内容,如果未能解决你的问题,请参考以下文章

mybatis的报错____3Error updating database. Cause: java.sql.SQLSyntaxErrorException: You have an error

mybatis的报错总结_____2Error updating database. Cause: java.sql.SQLSyntaxErrorException: You have an err

mysql数据库__Jdbc直接操作__Statement__update

Mysql下SELECT的结果集作为UPDATE的WHERE条件时的SQL语法

使用 GROUP BY 的 UPDATE 视图上的 SQL 错误

SQL的问题