How to pass an entire row (in SQL, not PL/SQL) to

2019-07-18 15:49发布

I am having the following (pretty simple) problem. I would like to write an (Oracle) SQL query, roughly like the following:

SELECT count(*), MyFunc(MyTable.*)
FROM MyTable
GROUP BY MyFunc(MyTable.*)

Within PL/SQL, one can use a RECORD type (and/or %ROWTYPE), but to my knowledge, these tools are not available within SQL. The function expects the complete row, however. What can I do to pass the entire row to the stored function?

Thanks!

1条回答
我只想做你的唯一
2楼-- · 2019-07-18 16:31

Don't think you can.

Either create the function with all the arguments you need, or pass the id of the row and do a SELECT within the function.

查看更多
登录 后发表回答