日期:2014-05-17  浏览次数:20898 次

未找到预期from关键字?? case语句的问题
create   table     a1   (
batch   varchar2(20)  
)

select   batch     ,case   batch   when   'pj '   then   'yes '   else   'no '   end   from   a1  

为何这样?

------解决方案--------------------
select batch ,case when batch = 'pj ' then 'yes ' else 'no ' end from a1

这样写的,多看看书
------解决方案--------------------
按照楼上的方法,when写错地方了。
------解决方案--------------------
select batch ,case when batch = 'pj ' then 'yes ' else 'no ' end from a1