Restrictions on the Defining Subquery of a View The view subquery cannot select the CURRVAL or NEXTVAL pseudocolumns. If the view subquery selects the ROWID, ROWNUM, or LEVEL pseudocolumns, those columns must have aliases in the view subquery. If the view subquery uses an asterisk (*) to select all columns of a table, and you later add new columns to the table, the view will not contain those columns until you re-create the view by issuing a CREATE OR REPLACE VIEW statement. For object views, the number of elements in the view subquery select list must be the same as the number of top-level attributes for the object type. The datatype of each of the selecting elements must be the same as the corresponding top-level attribute. You cannot specify the SAMPLE clause.
正确,没有问题:this is my view select fun1(tb1.col1),fun2(tb1.col2) from tb1 where fun3(tb1.col1) > 100
可以:这是我建立的视图:如下 sql>create view aaaa as 2 SELECT "OA_PVT_APPENDIX"."BBH","OA_PVT_APPENDIX"."XH", 3 F_GET_APPENDIX("OA_PVT_APPENDIX"."APPENDIX" ,102,'01002','2003/12/31') 4 FROM "OA_PVT_APPENDIX" 5; View created sql> F_GET_APPENDIX是我自己定义的函数。
The view subquery cannot select the CURRVAL or NEXTVAL pseudocolumns.
If the view subquery selects the ROWID, ROWNUM, or LEVEL pseudocolumns, those columns must have aliases in the view subquery.
If the view subquery uses an asterisk (*) to select all columns of a table, and you later add new columns to the table, the view will not contain those columns until you re-create the view by issuing a CREATE OR REPLACE VIEW statement.
For object views, the number of elements in the view subquery select list must be the same as the number of top-level attributes for the object type. The datatype of each of the selecting elements must be the same as the corresponding top-level attribute.
You cannot specify the SAMPLE clause.
select fun1(tb1.col1),fun2(tb1.col2) from tb1 where fun3(tb1.col1) > 100
sql>create view aaaa as
2 SELECT "OA_PVT_APPENDIX"."BBH","OA_PVT_APPENDIX"."XH",
3 F_GET_APPENDIX("OA_PVT_APPENDIX"."APPENDIX" ,102,'01002','2003/12/31')
4 FROM "OA_PVT_APPENDIX"
5; View created
sql>
F_GET_APPENDIX是我自己定义的函数。