asp问题,有关ADO中查询语句

jianchengfine 2003-10-22 08:50:11
我要实现从一个数据库的多个表查询同一个字段(数字型的),然后选择头10个,
如何写呢?
select top 10 a.hit,b.hit from a,b order by a.hit and b.hit desc

select top 10 a.hit,b.hit from a,b order by hit desc
用了,都不行,怎么不行呢?
...全文
50 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
kevin_gao 2003-10-22
  • 打赏
  • 举报
回复
select top 10 hit from
(
select distinct a.hit as hit from a
union
select distinct b.hit as hit from b
) as pp order by hit desc
kevin_gao 2003-10-22
  • 打赏
  • 举报
回复

select top 10 hit from
(
select distinct a.hit as hit from a
union
select distinct b.hit as hit from b
) as pp

28,404

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧