Questions tagged [table-functions]

A function in a relational database system that does not return a single value or row, but an arbitrary number of them. In SQL, a call to a table function can usually be used instead of a table.

A function in a system that does not return a single value or , but an arbitrary number of them.

In , a call to a table function can usually be used instead of a table.

Table functions go by different names in different relational database systems, such as in .

94 questions
-1
votes
1 answer

Create function that returns table in SQL

I wanted to create view with some logic like using (for loop , if .. else) but since that's not supported in SQL I thought of creating table function that takes no parameter and returns a table. I have a table for orders as below OrderId …
rav
  • 211
  • 5
  • 14
-1
votes
2 answers

DB2 - how to call a stored procedure that returns a result set in another user defined table function

I have a db2 stored procedure that takes in some parameters, gets some data from somewhere and then returns a result set through a cursor. Now I want to write a table function in db2, that will call this stored procedure, read from the result set…
-4
votes
1 answer

Function that receive table name as input variable to be used in CROSS APPLY

I need to create a Db function that returns a list of GUID, but from different tables. So I'm trying to create a db function, that get as input the name of the table, and return a list (table with only one field), but since I cannot use dynamic sql…
ff8mania
  • 1,553
  • 3
  • 19
  • 28
-4
votes
1 answer

Possible to create a function that returns more than one column?

Does SQL have the concept of a function that returns multiple columns, outside of a table function? Here would be an example: SELECT id, SPLIT_NAME(name, ' ') FROM table And I want the SPLIT_NAME function to produce two columns, one for…
David542
  • 104,438
  • 178
  • 489
  • 842
1 2 3 4 5 6
7