select *
from tb
where id not in (select top n id from tb)

解决方案 »

  1.   


    Select col.[name]   as '字段名', pro.value   as '描述'   From syscolumns as col  Left Join systypes as type on col.xtype = type.xtype  Left Join sysProperties as pro on col.id = pro.id and col.colid = pro.smallid  where col.id = (Select id From Sysobjects Where name = 'lx')这条语句怎么改
      

  2.   


    select * from 
    (Select col.[name] as '字段名', pro.value as '描述' 
    From syscolumns as col Left Join systypes as type on col.xtype = type.xtype 
    Left Join sysProperties as pro on col.id = pro.id and col.colid = pro.smallid 
    where col.id = (Select id From Sysobjects Where name = 'lx') ) a 
    where 字段名 not in 

    Select top 3 col.[name] as '字段名' 
    From syscolumns as col Left Join systypes as type on col.xtype = type.xtype 
    Left Join sysProperties as pro on col.id = pro.id and col.colid = pro.smallid 
    where col.id = (Select id From Sysobjects Where name = 'lx') )