急!从10个表里面读取数据的问题

chiev 2003-07-27 12:51:41
我现在要在一个页面调出10多个表里面的id , title 等字段的数据用列表、分页显示出来,sql语句怎么写?

大家帮忙啊
...全文
32 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
胖河马 2003-07-28
  • 打赏
  • 举报
回复
如果字段相同可以用UNION
(select id,title from b1) union (select id,title from b2) union ……
Jaron 2003-07-27
  • 打赏
  • 举报
回复
那就是用 全外连接

full join
chiev 2003-07-27
  • 打赏
  • 举报
回复
用 left outer join ?

估计楼上的这两位朋友没有明白我的意思,我这10个表之间没有任何关联关系,我现在只要把他们集中显示在一个页面而已
Jaron 2003-07-27
  • 打赏
  • 举报
回复
用 left outer join

你试试在视图里做,然后会自动生成SQL语句。
Jaron 2003-07-27
  • 打赏
  • 举报
回复
sql = "SELECT top " & maxrecords & " tblArticles.id,tblArticles.news_title,tblArticles.title_color,tblArticles.images,tblArticles.img_width,tblArticles.img_height,tblArticles.date_time,tblArticles.class_id,tblCategory.PHYSICAL_PATH,tblArticles.news_content FROM tblArticles LEFT OUTER JOIN tblCategory ON tblArticles.class_id = tblCategory.class_id where mode=5 and tblArticles.admincheck=1 and tblArticles.class_id=" & sortid & " order by id desc"
dgm8 2003-07-27
  • 打赏
  • 举报
回复
Select id ,title From table1,table2,...,table10

28,391

社区成员

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

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