当前位置: 代码迷 >> ASP >> 怎么读出给定的几个类别下的新闻
  详细解决方案

怎么读出给定的几个类别下的新闻

热度:311   发布时间:2012-02-29 16:44:11.0
如何读出给定的几个类别下的新闻?
现在有分类
1,2,3,4,5
数据都在一张表里,怎么把这些分类的前10条数据读取出来?

------解决方案--------------------
sql= "select top 10 * from 表 where 类别=1 union select top 10 * from 表 where 类别=2 union select top 10 * from 表 where 类别=3 union select top 10 * from 表 where 类别=4 union select top 10 * from 表 where 类别=5 "
  相关解决方案