---
sourceDocument: Xanadu ServiceNow AI Platform Administration
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/platform-administration

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu ServiceNow AI Platform Administration

ft:clusterId :

    - platadm

bundleId :

    - platadm

workflow :

    - Platform


---

# Select \* JDBC Probe short cut

# Select \* JDBC Probe short cut {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

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>

**Related tasks**   

* [JDBCProbe](https://servicenow-prod.fluidtopics.net/4E7tkaBMmwGF4VBg9ZKK9A "A JDBC probe runs on the MID Server to query an external database via [JDBC] and returns results to ServiceNow.")

