SQL Command Set
Exec SQL Executes the given SQL against the configured database and commits.
This command is not part of the Default Command Set. You have to register the SQL Command Set first (see Configuration).
Executes the given SQL against the configured database and commits.
Parameters
sql
Specifies the SQL to execute (required).
Examples
Config (wetator.properties)
wetator.db.connections=[db name]
wetator.db.[db name].driver=org.hsqldb.jdbcDriver (the jdbc driver of your db)
wetator.db.[db name].url=[jdbc:...] (the jdbc url of your db)
wetator.db.[db name].user=[user]
wetator.db.[db name].password=[password]
wetator.db.[db name].driver=org.hsqldb.jdbcDriver (the jdbc driver of your db)
wetator.db.[db name].url=[jdbc:...] (the jdbc url of your db)
wetator.db.[db name].user=[user]
wetator.db.[db name].password=[password]
Create a new table and insert some values
Command | Parameter | Optional Parameter | |
---|---|---|---|
exec-sql | DROP TABLE IF EXISTS test_tbl | ||
exec-sql | CREATE TABLE test_tbl (col1 CHAR(20), col2 NUMERIC) | ||
exec-sql | INSERT INTO test_tbl (col1, col2) VALUES ('First', 1) | ||
exec-sql | INSERT INTO test_tbl (col1, col2) VALUES ('Second', 2) |
Call a stored procedure (ORACLE)
Command | Parameter | Optional Parameter | |
---|---|---|---|
exec-sql | BEGIN MYSCHEMA.MYPROC; COMMIT; END; |
Assert SQL
This command is not part of the Default Command Set. You have to register the SQL Command Set first (see Configuration).
Assert SQL in Content
This command is not part of the Default Command Set. You have to register the SQL Command Set first (see Configuration).