如何在if语句中创建View? [英] How to create View in if statement ?
问题描述
嗨
我正在使用oracle数据库。
在一个程序中我需要创建视图然后使用该视图。
所有查询都创建并且单独运行。
我在plsql中表现不佳。
场景喜欢:
if(条件)
craete查看studentInfo作为select * from student;
其他
返回;
结束if;
问题:
错误显示在行创建视图开始需要等等。
请帮忙。
提前致谢。
Hi
I am using oracle database.
In one procedure on condition i need to create view and then use that view.
All queries created and working fine separately.
I am not good in plsql.
Scenario Like:
if (condition)
craete view studentInfo as select * from student;
else
return;
end if;
Problem :
Error shows at line create view that begin needs etc.
Please help.
Thanks in advance.
推荐答案
请参考以下链接。
http://stackoverflow.com/questions/11886321/create-view-must-be-the-only-statement-in-the-batch
Please refer the following link.
http://stackoverflow.com/questions/11886321/create-view-must-be-the-only-statement-in-the-batch
这篇关于如何在if语句中创建View?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!