mysql语句两表查询

mysql语句两表查询-每日运维

mysql两个数据库的表能连接查询吗?

mysql两个数据库的表能连接查询。


mysq

insert B
select *
from A
where not exists(select * from b where b.字段1=A.字段1 and b.字段2=A.字段2....); 把字段全补上

更加简单的方法如下:
insert ignore into B
SELECT * FROM A;


mysql 对两个表查询的SQL语句

select a.*,b.* `表一` a,`表二` b where a.id=b.id and a.title="爱你一万年"