MYSQL應用inner join 停止 查詢/刪除/修正示例。本站提示廣大學習愛好者:(MYSQL應用inner join 停止 查詢/刪除/修正示例)文章只能為提供參考,不一定能成為您想要的結果。以下是MYSQL應用inner join 停止 查詢/刪除/修正示例正文
--查詢
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< 2013-05-31 ;
-- 修正
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' ;