我现在有一张表,如果有8条记录,现在要显示10条,别外两条都用0表示

解决方案 »

  1.   

    select * from table
    union all
    '0','0','0','0'--按列多少定
    union all
    '0','0','0','0'
      

  2.   

    select * from table union all select  '0','0','0','0'--按列多少定 union all select   '0','0','0','0'
      

  3.   

    可以吗?其实2楼的0前没有加select
      

  4.   

    select * from table
    union all
    '0','0','0','0'--按列多少定
    union all
    '0','0','0','0'
      

  5.   


    select * from table 
    union all 
    '0' as 第一个字段的名字,'0'as 第二个字段的名字  
    union all 
    '0' as 第一个字段的名字,'0'as 第二个字段的名字  
    如 表 有A,B 字段select * from table
    union all
    select '0' as A,'0' as B
    union all
    select '0' as A,'0' as B
      

  6.   

    select  * from a 
    union select all  '0' from a 
    union all select top 1 '0' from a 
      

  7.   

    直接用最简单的方法:
    select *,'0','0' from Table