sqlQuery() - Run a JSON SQL query command
Runs an SQL query at the database level.
Syntax diagram
Command parameters
- sql
- This string parameter specifies an SQL query. It might contain parameter markers.
- parameters
- This optional string parameter specifies a list of parameter values to match any markers in the query.
Example
Issue an SQL query:
db.sqlQuery("select count(*) from test.products")Sample
output is as follows: 