SQL Server 2008 - UDF Parameter Types And Return Types

339 Views Asked by At

I often stumble at the following while writing UDFs in SQL 2008. Please tell me whether my following assumptions are right or wrong.

  1. A UDF can return Data Table.
  2. But a UDF can't receive a Data Table as a parameter.
  3. A UDF can receive an User-Defined-Table- Type(UDTT) as a parameter.
  4. But a UDF can't return an User-Defined-Table-Type(UDTT).
3

There are 3 best solutions below

0
On
  1. Right
  2. Right (if you mean - real existing table, not table typed variable)
  3. Right
  4. Right
0
On
  1. Right.
  2. Right.
  3. Right, unless it is a CLR UDF.
  4. Right.
0
On
  1. table valued functions can, no scalar ones
  2. Correct
  3. Correct
  4. Correct