r2dbc_query()

Read(139) Label: query, sql,

Description:

Query a database through R2DBC.

Syntax:

r2dbc_query(con,sql)

Note:

The external library function queries the specified SQL statement sql in a database and returns a table sequence consisting of the result of the SQL query.

Parameters:

con

Databae connection string

sql

The SQL statement to be queried, such as select * from table

Return value:

A table sequence

Example:

 

A

 

1

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

Connect to H2 database

2

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

Query data in table table

3

=r2dbc_close(A1)