一表格type字段,type字段有1,2,3,4,5这五个值,现在想只获取1,2,3这几个;
请问怎么做

解决方案 »

  1.   

    select * from [table] where type <=3
    select * from [table] where type in (1,2,3)
      

  2.   

    SELECT TOP 3 TYPE FROM TB ?
      

  3.   

    select * from tb
    where type < 4           
    ????????
      

  4.   

    no,no,no
      

  5.   

    select * from @tableName where type in (1,2,3) ?
      

  6.   

    select * from  table where type<>'4' and type<>'05'
      

  7.   

    in?
    select * from tableName where type in (1,2,3) ?
      

  8.   

    select * from @tableName where type in (1,2,3)