case 只在9i以上的版本中好用,9i以下的版本不支持的,在存储过程中应该也是可以用的./

解决方案 »

  1.   

    用Decode函数SELECT product_id,
           DECODE (warehouse_id, 1, 'Southlake', 
                                 2, 'San Francisco', 
                                 3, 'New Jersey', 
                                 4, 'Seattle',
                                    'Non-domestic') 
           "Location of inventory" FROM inventories
           WHERE product_id < 1775;
      

  2.   

    晕啊我想要的是
    select case i
    case 0
    case 1
    case 2
    end case;
    这样的,
    oracle查询语句里面的case ,decode ...就不要说了撒
      

  3.   

    case value
     when expression1 then
       statement1;
    end case;
      

  4.   

    9i中加入了SELECT CASE,而8i中如果有比较大段的选择一般都用
    if 
    else
    end if.

    if
    elsif
    else
    end if;