标签:exists
left join与exists效率比较
sql1: select A.* from tb_a A left join (select AID,MAX(date) from tb_b GROUP BY AID HAVING MAX(date)>NOW()) B ON B.AID=A.id where b.AID IS not NULL sql2: SELECT A.* from tb_a A ……
05-03 立刻查看
mysql删除“delete……from……exists”不执行
DELETE m FROM `mall_commodity_launch_codev2` m WHERE EXISTS ( SELECT sCode, nCmdtId FROM ( SELECT t.`s_code` AS sCode, t.`n_commodity_id` AS nCmdtId, COUNT(1) NUM FROM `mall_com……
02-05 立刻查看