Skip site navigation (1) Skip section navigation (2)

Re: Number of Records in a Table

From: David Olbersen <dave(at)slickness(dot)org>
To: Charles Welch <caddbase(at)rapfire(dot)net>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Number of Records in a Table
Date: 2001-03-13 02:13:04
Message-ID: Pine.LNX.4.31.0103121812030.27230-100000@bubbles.electricutopia.net (view raw or flat)
Thread:
Lists: pgsql-novice
On Fri, 9 Mar 2001, Charles Welch wrote:

->How can you determine how many records exist in a table with out doing a
->SELECT statement and then counting the records that are read?

I assume you mean counting by hand...

SELECT COUNT( -primarykey- ) FROM table;

obviously put your pirmary key and table name where they belong.

-- Dave


In response to

pgsql-novice by date

Next:From: Rob ArnoldDate: 2001-03-13 02:18:42
Subject: Re: array column problem
Previous:From: mikhail malamudDate: 2001-03-13 02:13:03
Subject: RE: add primary key

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group