Home > Database > Mysql Tutorial > body text

MYSQL使用inner join 进行 查询/删除/修改示例_MySQL

WBOY
Release: 2016-06-01 13:25:20
Original
1152 people have browsed it

bitsCN.com
--查询
SELECT tp.tp_id, tp.tpmc, tp.leveid, tp.tpdz, tp.jgm, tp.scsj, tp.pbzyid, tp.ksbfsj, tp.jsbfsj, tp.status, tp.tpbz FROM qdgl_tupian tp INNER JOIN qdgl_pqb pq
ON tp.tp_id=pq.tpid WHERE pq.bfjgm='27010825' AND ps_bfsj >= '2013-01' AND ps_bfsj

-- 修改
UPDATE jx_lsjl jx INNER JOIN isa_gtxx gt ON jx.ckid=gt.gtbh set jx.ckid=gt.gtid WHERE gt.jgm='27010825' AND jx.jgm='27010825' ;


--删除
DELETE FROM jx_lsjl jx INNER JOIN isa_gtxx gt ON jx.ckid=gt.gtbh WHERE gt.jgm='27010825' AND jx.jgm='27010825' ;
bitsCN.com

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!