当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: 分析下列程序的结果 #include<iostream.h> #define min(x,y) (x)<(y)?(x):(y) void main() { int i=10,j=15,k; k=10*min(i,j); cout<<k<<endl; } ......
    摘要: 我做了一个简单的服务器和客户端之间连接的程序。就是想问一下通过什么样的方法让服务器或者客户端知道对方已经断开了,我的这个断掉就断掉了,没有反应。刚开始学,希望高手们指教一下:) ......


select指定行

一个表tabalename里有几百条数据      
     
  我知道select   top   5   *   from   tablename可以查询出前5行数据      
     
  我想查询出指定某行      
  如,第5行      
     
  请问应该怎么写语句?

NO.1   作者: aierong

 
  1.  
  select   top   1   *    
  from   tablename  
  where   ids   not   in(select   top   4   ids   from   tablename)  
   
  ids是表里面的主键,或者是唯一字段  
   
  2.  
  还有一种方法是创建临时表解决

NO.2   作者: sdhdy

select   identity(int,1,1)   F0   ,*   into   #temp   from   tablename  
  select   *   from   #temp   where   F0=5  
  drop   table   #temp


    摘要: 我用mfc生成一个mfc extension dll,然后插入一个dialog,生成一个类cdlg. 我用mfc一个exe程序调用(调用方法应该是对的),编译的时候出错: error c2065: idd_dialog1 : undeclared identifier error c2057: expected constant expression 如果我不生成界面类,则是可以成功......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE