image0 Sql Query

Executes a query on a database connection.

Inputs

Connection (Type: MySql.Data.MySqlClient.MySqlConnection)

The database connection.

Query (Type: String)

The query string.

Sync (Type: Object)

This input can be connected to any other object. It is used to establish an order of execution.

Outputs

Rows (Type: List<List<String>>)

The result of the query.

Comments

This command allows you to execute any query on a database.

See the MySql documentation for more information about how to construct SQL queries.

The MySql tutorial may help you in constructing query strings.

Here is an example taken from this tutorial that shows how to build a query (‘SELECT VERSION(), CURRENT_DATE;’) and how to read the results. The example assumes that you have MySql installed and that you can connect to the sakila sample database.