SQL Statement

The SQL Statement Advanced action executes SQL statements. It enables you to perform administrative tasks like cleaning a database after a test. It also allows you to get business-related metrics that you can monitor, for example the number of items in a work queue or the number of checkouts during the last minute.

The action produces an XML output that includes a status of the executed SQL statement as well as an optional section containing the results of the query. The query results are also stored in NeoLoad variables.

Information: In case of connection with Microsoft SQL Server 2005, you need to replace the Microsoft SQL Server 4.1 JDBC Driver with the Microsoft SQL Server 4.0 JDBC Driver by following this procedure.



When executing a query, be careful to specify the variable name, i.e "sqlEntries" and not "${sqlEntries}".

The query result values will be retrieved in the following variables:


An example of removing all lines of a table:

An example of getting number of rows:

An example of SELECT with a custom driver: