# How to Pass a Table Valued Parameter to a T-SQL Function with jOOQ

DevFeed: [How to Pass a Table Valued Parameter to a T-SQL Function with jOOQ](<https://devfeed.tech/articles/how-to-pass-a-table-valued-parameter-to-a-t-sql-function-with-jooq-28943.md>)

Original publisher: [Read original article](<https://blog.jooq.org/how-to-pass-a-table-valued-parameter-to-a-t-sql-function-with-jooq/>)

Author: lukaseder

Published: 2023-04-25T12:16:30Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [sql-server](<https://devfeed.tech/topics/sql-server.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Java](<https://devfeed.tech/topics/java.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [code-generation](<https://devfeed.tech/tags/code-generation.md>), [code-generator](<https://devfeed.tech/tags/code-generator.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [java](<https://devfeed.tech/tags/java.md>), [jdbc](<https://devfeed.tech/tags/jdbc.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [sql-server](<https://devfeed.tech/tags/sql-server.md>), [t-sql](<https://devfeed.tech/tags/t-sql.md>), [table-valued-function](<https://devfeed.tech/tags/table-valued-function.md>), [table-valued-parameter](<https://devfeed.tech/tags/table-valued-parameter.md>)

## AI overview

This tutorial explains how to pass a Microsoft T-SQL table-valued parameter to a function using jOOQ. It covers native T-SQL and JDBC usage, then shows how jOOQ's code generator produces Java types and methods for calling the function and accessing its result rows.

## Source excerpt

Microsoft T-SQL supports a language feature called table-valued parameter (TVP), which is a parameter of a table type that can be passed to a stored procedure or function. For example, you may write: This function takes a table-valued parameter (TVP), and produces a result set containing the cross product of the parameter table with itself. ... Continue reading How to Pass a Table Valued Parameter to a T-SQL Function with jOOQ ->