Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Select * JDBC Probe short cut

Alternatively, you may specify a table_name parameter instead of a work element and the following query could be executed.

select * from <table_name>

For example, using the following XML payload

<?xml version= "1.0" encoding= "UTF-8" ?><parameters><parameter name = "jdbc_driver" value = "com.microsoft.sqlserver.jdbc.SQLServerDriver" /><parameter name = "connection_string" value = "jdbc:sqlserver://xxx.service-now.com;databaseName=SMS_CRICKET;user=sms;password=sms" /><parameter name = "table_name" value = "System_DATA" /></parameters>

Counting Rows

To count the number of rows in a table, you can indicate a select count(*) type query by including the count_rows parameter with a value of true.

For example

<?xml version= "1.0" encoding= "UTF-8" ?><parameters><parameter name = "jdbc_driver" value = "com.microsoft.sqlserver.jdbc.SQLServerDriver" /><parameter name = "connection_string" value = "jdbc:sqlserver://xxx.service-now.com;databaseName=SMS;user=sms;password=sms" /><parameter name = "count_rows" value = "true" /><parameter name = "table_name" value = "System_DATA" /></parameters>

The resulting response XML payload

<parameters>
  ...
  <result query = "SELECT count(*) as row_count FROM System_DATA" ><row id = "1" ><row_count class = "java.lang.Integer" length = "11" type = "4" >2312</row_count></row></result>
  ...
</parameters>

Parent Topic:JDBCProbe

Related topics

JDBCProbe