ClickHouse/docs/zh/sql_reference/table_functions/jdbc.md
2020-04-08 17:22:25 +03:00

30 lines
783 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
machine_translated: true
machine_translated_rev: b111334d6614a02564cf32f379679e9ff970d9b1
toc_priority: 43
toc_title: jdbc
---
# jdbc {#table-function-jdbc}
`jdbc(jdbc_connection_uri, schema, table)` -返回通过JDBC驱动程序连接的表。
此表函数需要单独的 `clickhouse-jdbc-bridge` 程序正在运行。
它支持可空类型基于查询的远程表的DDL
**例**
``` sql
SELECT * FROM jdbc('jdbc:mysql://localhost:3306/?user=root&password=root', 'schema', 'table')
```
``` sql
SELECT * FROM jdbc('mysql://localhost:3306/?user=root&password=root', 'schema', 'table')
```
``` sql
SELECT * FROM jdbc('datasource://mysql-local', 'schema', 'table')
```
[原始文章](https://clickhouse.tech/docs/en/query_language/table_functions/jdbc/) <!--hide-->