List of record counts in each table?

vprakash
Giga Contributor

Is there somewhere I can see a list of all the tables in ServiceNow and how many records each has?

6 REPLIES 6

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi vprakash



I don't think there is one way where you will get list of all the tables and records in ServiceNow.


But if you are looking for list of all the tables in ServiceNow then go to


system defintion->Tables and coloumns


To see records for the individual table you have to go to each module and click "ALL" (for example: incident->ALL)



Please let me know if you have any questions



Thanks and Regards


Pradeep Sharma


Cognizant


Hi Pradeep,                         Thanks for response. Hope you know table & columns only accessible by admin others can't do anything. We can able to see the row count by going to each table, but as I have around 1000 tables that I want to verify I've pulled all the records I am hoping that somewhere in SN there is a page/module I can get access to that will show me all the row counts on a single page.


Run this as a background script and then cut and paste into excel or something


gs.sql("SELECT TABLE_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA like '%instancename%'");


vprakash
Giga Contributor

Hi Drew,             I tried this sql query but gives me more row records count compare to list.do?. For example, https://instancename.service-now.com/task_list.do? -----> 306594 row counts Above sql query gives 341076 row counts for "task" table. do you why I am seeing two different results for same table?