mysql 查询语句

update point set point.boundry=1 from point,b_point where point.point_x_y=b_point.point_x_y;
select count(*) from point,b_point where point.point_x_y=b_point.point_x_y;


update point left join b_point on point.point_x_y=b_point.point_x_y set point.boundry=0 where point.point_x_y=b_point.point_x_y;


选出定点表和总点表的交集
select * from b_point left join point on point.point_x_y=b_point.point_x_y;

update point set point.boundry=0 ;

from (select * from b_point left join point on point.point_x_y=b_point.point_x_y);

//清空表
truncate table point;
truncate table b_point;
truncate table quad;
select * from b_point

select count(distinct sum) from quad

原文地址:https://www.cnblogs.com/zhuyaguang/p/4791900.html