You need to enable JavaScript to run this app.
导航
jdbc
最近更新时间:2024.11.11 17:54:05首次发布时间:2024.11.11 17:54:05

jdbc(datasource, schema, table) -返回通过JDBC驱动程序连接的表。
此表函数需要单独的 clickhouse-jdbc-bridge 程序才能运行。
它支持可空类型(基于查询的远程表的DDL)。
示例

SELECT * FROM jdbc('jdbc:mysql://localhost:3306/?user=root&password=root', 'schema', 'table')
SELECT * FROM jdbc('mysql://localhost:3306/?user=root&password=root', 'select * from schema.table')
SELECT * FROM jdbc('mysql-dev?p1=233', 'num Int32', 'select toInt32OrZero(''{{p1}}'') as num')
SELECT * 
FROM jdbc('mysql-dev?p1=233', 'num Int32', 'select toInt32OrZero(''{{p1}}'') as num')
SELECT a.datasource AS server1, b.datasource AS server2, b.name AS db
FROM jdbc('mysql-dev?datasource_column', 'show databases') a
INNER JOIN jdbc('self?datasource_column', 'show databases') b ON a.Database = b.name