Select a=Case when (工资>1000)and(职务='处长') then 0
              when (工资<1000)and(职务='科员') then 1
          end from 表名

解决方案 »

  1.   

    select 职务=case when 工资>1000  then '处长' when 工资<1000  then '科员' end from 
    tablename
      

  2.   

    select 职务=case when 工资>1000 then '处长' else工资<1000 then '科员' end from 表
      

  3.   

    update 表 set  职务=case when 工资>1000 then '处长' when 工资<1000 then '科员' end
      

  4.   

    select case 职务 when 工资>1000 then '处长' else工资<1000 then '科员' end from 表
      

  5.   

    select (case when 工资>1000  then '处长' when 工资<1000  then '科员' end) as 职务 from 
    tablename
      

  6.   

    select (case when 工资>1000  then '处长' when 工资<1000  then '科员' 
      else '处长秘书' end) as 职务 from 
    tablename
      

  7.   

    以下是统计相应条件下的人数SELECT 
          CASE 
             WHEN 工资>1000 and 职务='处长' THEN count(ID)
             WHEN 工资<1000 and 职务='科员' THEN count(ID)
             ELSE count(ID)'
          END
      
    FROM table_name
    group by ID
      

  8.   

    select (case when 工资>1000  then '处长' when 工资<=1000  then '科员' end) 职务 from tablename
      

  9.   

    想找小姐吗,来水园吧!
    这里有老龟奴zyq_123雍亲正当大版主,还有人称辣花摧魔前青楼名妓smoke当镇小版主,肯定能满足您的需要!!!快来吧~~~~~~