Skip to main content

Generic_JDBC_Connection.execute

executesql

Group: Output
Aliases: delete, insert, query, update

Documentation

Execute a raw SQL query or statement. execute does not execute the SQL unless the output context is enabled.

Arguments

  • sql: The SQL query or statement to execute.

Returns

  • the row count for a SQL DML statement, or 0 for SQL statements that return nothing.

Examples

Create a table.

      connection = Generic_JDBC_Connection.connect "jdbc:h2:~/my_database"
connection.execute "create table foo (a int)"