动态查询视图 [英] Dynamically query a view

查看:62
本文介绍了动态查询视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在PL/SQL的数据库表中存储了视图名称.我想从这些视图中获取汇总的列值.我该怎么办.

例如:我有表Employee,它具有列viewname. viewname列具有视图的名称.我必须查询存储在Employee表的viewname列中的视图.

I have viewnames stored in a database table in PL/SQL. I want to get aggregated column values from these views. How can I do it.

For example: I have table Employee which has column viewname. The viewname column has the name of the views. I have to query the views which are stored in the viewname column of Employee table.

推荐答案

对于SQL中的聚集,可以使用此

For aggregration in SQL you can use this

SELECT AVG(Amount) FROM Expenses




但是,如果您的问题与此不同,请进一步说明,或者您可以添加一个示例

希望这会有所帮助,如果是,则接受并投票回答,否则返回您的查询
--Rahul D.




But if your question meant different that this then please clarify more or you can add one example

Hope this helps if yes then accept and vote the answer otherwise revert back with your queries
--Rahul D.


这篇关于动态查询视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆