摘要:
PostgreSQL条件表达式 case when then end SELECT CASE WHEN (store_size <= (100)::NUMERIC) THEN '小店'::TEXT WHEN (store_size >= (200)::NUMERIC) THEN '大店'::TEXT 阅读全文
摘要:
查询定义变量 set session "myapp.user" =1;SELECT current_setting('myapp.user') 判断 SELECT (CASE WHEN (1 <= 100) THEN sum(ordinary_price) WHEN (1 >= 200) THEN 阅读全文