易截截图软件、单文件、免安装、纯绿色、仅160KB

SqlServer中查询10到20条之间的数据

 查询northwind数据库中orders中的10到20条记录
select   top   10   *   from   orders
 where   orderid > ( select  max(orderid)  from  (select top 10 orderid  from  orders order by orderid) as t  )
orders表中已有自增长的标识列orderid,
先查出表中前十条记录中的最大orderid,
10条以后的orderid肯定大于前十条的最大id,所以再where判断即可。
另外,如果要查询的表没有标识列,也可以使用下面这种方法:
select   top 20 identity(int ,1,1) as id *   into  #temp  from  table
select  *  from   #temp  where  id>10


相关文档:

SQLServer安装程序配置服务器失败

转载自:http://sunfreesky.blog.163.com/blog/static/211116820097224822596/
SQLServer安装程序配置服务器失败.参考服务器错误日志和c:\windows\sqlstp.log了解更多信息”错误
2007年07月15日 星期日 16:25
SQL 2000 安装程序配置服务器失败解决方法:
 
 
日志文件引用内容:
13:09:40 Process Ex ......

Sqlserver 中union和order by 子句的问题

Union默认是不能有order by子句
如果需要排序,则只能如下实现 
select * from (select top 100 PERCENT  * from 表名 order by 字段名) a
               union all
 select * from (select top 100 PERCENT  * from 表名 ......

C#读取sqlserver 动画flash swf 文件到本地硬盘

 using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlC ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号