Skip to content
Advertisement

get name of table in function

I need get name of table inside function:

how can i get table’s name (table) in function f?

Advertisement

Answer

You cannot get that implicitly, because there are no ties between the table in the FROM clause and the values fed to the function.

Imagine a query like

There is no single table involved!

If you need to pass a table to a function, you have to explicitly pass it:

You could call that like

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement