求mysql语句 各位我有一个主表id: 12345从表(主表外键Id)123我现在要查处id=1和第四条和第五条,怎么查询 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select *from 主表 where id not in (select 1 from 从表) select a.*from 主表 a left join 从表 b on a.id=b.idwhere b.id is null select a.* from 主表 a left join 从表 b on a.id=b.id where b.id is null unionselect * from 主表 where id=1 大家什么好的分页存储过程吗?我写了一个,但是觉得很臃肿,不好用,请大家贴出自己的分页吧. CentOS6.0下连接mysql数据库出现错误 请问各位天处理库存并发访问时如何处理 mysql查询语句怎么用上正则表达式? mysql中移动表到另一个数据库 有这么一个表,请问怎么写sql做排序? MYSQL 多表联合查询并分组的问题? 帮忙写一条语句,大侠们进来喝茶指点指点! 请教一个mysql存储过程的初级问题. MYSql行锁 mysql 客户端乱码 mysql建表时加索引
from 主表 where id not in (select 1 from 从表)
from 主表 a left join 从表 b on a.id=b.id
where b.id is null
union
select * from 主表 where id=1