oracle中创建视图,如果一个(order_no)字段为null时,显示为(group_no)另一个字段的值?

如题所述

CREATE OR REPLACE VIEW 视图名称 AS
SELECT
其他字段,
nvl(order_no, group_no)
FROM
表名
WHERE 条件';
温馨提示:答案为网友推荐,仅供参考
第1个回答  2012-09-14
select case when order_no is null then group_no else order_no end from table
相似回答