2020-03-30 12:48:55 +00:00
|
|
|
---
|
|
|
|
machine_translated: true
|
2020-05-15 04:34:54 +00:00
|
|
|
machine_translated_rev: 72537a2d527c63c07aa5d2361a8829f3895cf2bd
|
2020-04-04 09:15:31 +00:00
|
|
|
toc_priority: 43
|
|
|
|
toc_title: jdbc
|
2020-03-30 12:48:55 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# jdbc {#table-function-jdbc}
|
|
|
|
|
|
|
|
`jdbc(jdbc_connection_uri, schema, table)` - retourne la table qui est connectée via le pilote JDBC.
|
|
|
|
|
2020-05-15 04:34:54 +00:00
|
|
|
Ce tableau fonction nécessite séparé `clickhouse-jdbc-bridge` programme en cours d'exécution.
|
2020-03-30 12:48:55 +00:00
|
|
|
Il prend en charge les types Nullable (basé sur DDL de la table distante qui est interrogée).
|
|
|
|
|
|
|
|
**Exemple**
|
|
|
|
|
|
|
|
``` 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')
|
|
|
|
```
|
|
|
|
|
|
|
|
[Article Original](https://clickhouse.tech/docs/en/query_language/table_functions/jdbc/) <!--hide-->
|