合并两张表,LIMIT 查询 本帖最后由 cxc3787582 于 2012-09-28 17:44:19 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from (select name as n ,null as t ,id ,sex from aunion allselect lastname,titile,tid,null from b) tlimit 30 将2张表UNION ALL即可需要用 LIMIT 分页?详细说明 SELECT * FROM (SELECT name as n,null as t,id ,sex FROM aUNION ALL SELECT lastname,title,tid,null FROM b)mLIMIT 30; select * from (select name as n ,null as t ,id ,sex from aunion allselect lastname,titile,tid,null from b) tlimit 30,10; 高手帮忙解决一下,急!Aborted connection 还是请教中文?问题,情况比较特殊 不重复的数据 MYSQL定时执行语句如何实现啊~~~~~救救命 MYSQL建表问题 为什么汉字模糊查询会出错(在线等) 如何查询一个月中每天指定时间段的累计值 VB中哪个控件可以访问远程的MYSQL数据库 mysql如何允许远程连接 动态web表单 写入数据库失败 mysql 生成随机数 问问大侠门 请教SQL问题
select name as n ,null as t ,id ,sex from a
union all
select lastname,titile,tid,null from b
) t
limit 30
(SELECT name as n,null as t,id ,sex FROM a
UNION ALL
SELECT lastname,title,tid,null FROM b
)m
LIMIT 30;
select name as n ,null as t ,id ,sex from a
union all
select lastname,titile,tid,null from b
) t
limit 30,10;