多表查询,数据库达人来。

[复制链接]
查看11 | 回复5 | 2009-6-11 12:47:34 | 显示全部楼层 |阅读模式
c是作为 select id,title from info14 union all select id,title from info15 union all select id,title from info16 union all select id,title from info17 union all select id,title from info18这个查询结果的别名...
回复

使用道具 举报

千问 | 2009-6-11 12:47:34 | 显示全部楼层
select id,title from info14 union all select id,title from info15 union all select id,title from info16 union all select id,title from info17 union all select id,title from info18...
回复

使用道具 举报

千问 | 2009-6-11 12:47:34 | 显示全部楼层
C是临时表的别名...
回复

使用道具 举报

千问 | 2009-6-11 12:47:34 | 显示全部楼层
(select id,title from info14 union all select id,title from info15 union all select id,title from info16 union all select id,title from info17 union all select id,title from info18...
回复

使用道具 举报

千问 | 2009-6-11 12:47:34 | 显示全部楼层
这里的C应该是数据库中的一个表名吧。order by c.time desc即是实现按C表中的TIME字段排序。top 6 c.* 即是实现显示C表中符合条件的前六条记录的所有字段....
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行