多条件情况查询,sql select case when when else

时间:2023-01-20 07:03:47

多条件情况查询

SELECT
多条件情况查询,sql select case when when else     Title,
多条件情况查询,sql select case when when else    'Price Range' =
多条件情况查询,sql select case when when else    CASE
多条件情况查询,sql select case when when else        WHEN price IS NULL THEN 'Unpriced'
多条件情况查询,sql select case when when else        WHEN price < 10 THEN 'Bargain'
多条件情况查询,sql select case when when else        WHEN price BETWEEN 10 and 20 THEN 'Average'
多条件情况查询,sql select case when when else        ELSE 'Gift to impress relatives'
多条件情况查询,sql select case when when else    END
多条件情况查询,sql select case when when elseFROM titles

select *,case when ActualTime is null then null  when PlanTime  is null then null  else   ISNULL(ActualTime, 0) - ISNULL(PlanTime, 0)   end    as   Difference
         from KPI_TaskActivities