投影视图,就是字面的意思,通过投影产生的视图
很显然,现在考虑了NULL了,对比3类写法传入:oid是NULL的结果:
dingjun123@ORADB> exec :oid := null;
PL/SQL procedure successfully completed.
--原始数据75236条
dingjun123@ORADB> SELECT COUNT(*) from t ;
COUNT(*)
----------
75236
1 row selected.
--写法1考虑NULL情况
dingjun123@ORADB> select count(*) from t WHERE :OID IS NULL OR object_id=:OID ;
COUNT(*)
----------
75236
1 row selected.
projection view 投影视图