开发者

Use TREAT to restrict subtypes in a query in Oracle

According to the Oracle docs, i c开发者_开发问答an use TREAT to return a specific subtype in a query, see Example 2-38

However, the docs also state that for any subtypes that aren't students (in the example), it returns NULL.

Since i am using PUT_LINE to output a report, with headings "STUDENT NAME: " etc, it is outputting rows of empty headings.

How can i stop this behaviour?

Thanks


Can you specify the TREAT expression in the WHERE clause? Or wrap the statement in an online view and filter out the nulls in the outer portion's WHERE clause?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜