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

 

    摘要: #include "stdafx.h" #include <iostream.h> class base { public: virtual void fn() { cout << "base class!" << endl; } }; class subclass : base { public: v......
 ·使用文本框时遇到的一个问题    »显示摘要«
    摘要: 我用了ui组件的scrollbar用来控制一个文本框的内容显示,但发现一个怪问题,当我将一段文本定义成dynamic text时,有时用鼠标拖动文本框的大小时,文本框右下角显示成一个白色的小框,这时文本框不能定义成小与文本段落的高度。但有时右下角会出现一个黑色小框,这时拖鼠标的话文本框可以变成任意大小的,一直搞不清楚是怎么搞的???难道是软件的问题??本来就是随机的,有时会这样有时会那样?......


这样得sql语句如何写

表ABC如下,ID是主健,现在想找出最小跳号Id的值,  
  如果数据如下,那么id为6,8的记录有跳号,id为9,13的记录也有跳号,  
  但最小的是6,结果就是6。应该怎么写啊。不想用存储过程和游标。  
  ID         Name  
  1           add  
  2           fff    
  3           ffdf  
  4           sdf  
  5           ssssf  
  6           sdf  
  8           sdf    
  9           sdf    
  13         sssss

NO.1   作者: txlicenhe

Select   top   1   ID   from   表   a    
        where   not   exists   (Select   ID   from   表   where   ID   =   a.ID   +   1)

NO.2   作者: Varchar

Select   min(ID)+1   as   id   from   表   a    
        where   not   exists   (Select   1   from   表   where   ID   =   a.ID   +   1)  
 

NO.3   作者: myflok

select   min(id)   from  
  (select   *,(select   count(*)   from   ABC   where   id<=XXX.id)   as   row   from   ABC   as   XXX   order   by   id)   as   yyy   where   id<>row

NO.4   作者: Varchar

or:  
  Select   top   1   ID+1   as   id   from   表   a    
        where   not   exists   (Select   ID   from   表   where   ID   =   a.ID   +   1)  
  order   by   id  
 

NO.5   作者: myflok

select   min(id)-1   from  
  (select   *,(select   count(*)   from   ABC   where   id<=XXX.id)   as   row   from   ABC   as   XXX   order   by   id)   as   yyy   where   id<>row  
 

NO.6   作者: yujohny

select   top   1   ID   from   表   a  
      where   not   exists   (select   1   from   表   where   ID   =   a.ID+1)  
  order   by   ID

NO.7   作者: zarge

Select   min(ID)   from   表   a    
        where   not   exists   (Select   1   from   表   where   ID   =   a.ID   +   1)  
 


 ·refactoring是什么意思    »显示摘要«
    摘要: refactoring是什么意思?给出详细解释就立刻给分. ......
» 本期热门文章:

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