Command to determine how many entries there are in a database table
search cancel

Command to determine how many entries there are in a database table

book

Article ID: 303497

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

What command do I run to determine how do I tell how many database entries there are in a NCM database table?

Environment

NCM 10.1.X

Resolution

To tell how many entries there are in a Smarts NCM database table, do the following:

  • Launch a command prompt window and log into the postgres as follows:

    su - pgdba
    psql voyencedb voyence
  • Once logged in run the following:
    select count(*) from <table>;

     

Example

select count(*) from cm_device;

(Where the name of the table is cm_device.)

The output of this command would be as follows:

voyencedb=# select count(*) from voyence.cm_device;
 count
-------
     4
(1 row)