r2dbc_query()

阅读(1760) 标签: 查询, sql,

描述:

查询r2dbc

语法:

r2dbc_query(con,sql)

备注:

外部库函数,外部库的使用请参考《外部库使用指南》。

在数据库中查询指定的sql,返回sql的查询结果所组成的序表。

参数:

con

数据库连接串。

sql

需要查询的sql语句,如select * from table

返回值:

序表

示例:

 

A

 

1

=r2dbc_open("r2dbc:h2:mem:///testdb?options=DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE")

连接H2数据库。

2

=r2dbc_query(A1, "select  *  from  table")

查询table表数据。

3

=r2dbc_close(A1)