Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
根据 Oracle 文档,我可以用来TREAT在查询中返回特定的子类型,参见示例 2-38
TREAT
但是,文档还指出,对于不是学生的任何子类型(在示例中),它返回 NULL。
由于我PUT_LINE用于输出带有标题“学生姓名:”等的报告,因此它正在输出空标题行。
PUT_LINE
我怎样才能阻止这种行为?
谢谢
你能在 WHERE 子句中指定 TREAT 表达式吗?或者将语句包装在在线视图中并过滤掉外部 WHERE 子句中的空值?