select count(*)

From: Rajesh Kumar Mallah <mallah(dot)rajesh(at)gmail(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: select count(*)
Date: 2011-03-09 17:44:42
Message-ID: AANLkTikijnqxh1zLJHQSqh6Ww82Y068PQ0Du9QO2LUmM@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear List ,

if we simply do select count(*) and not specify any table then it gives 1
eg:

bric=# SELECT count(*) from job ;
count
-------
2380
(1 row)

bric=# SELECT count(*) job ;
job
-----
1
(1 row)

bric=# SELECT count(*) ;
count
-------
1
(1 row)

bric=# SELECT count(*) job_non_exist ;
job_non_exist
---------------
1
(1 row)

bric=# SELECT count(*) jo1b ;
jo1b
------
1
(1 row)

bric=# SELECT count(*) none ;
ERROR: syntax error at or near "none"
LINE 1: SELECT count(*) none ;

I fail to see any progression ?

regds
mallah.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bill Moran 2011-03-09 17:50:32 Re: select count(*)
Previous Message Jaiswal Dhaval Sudhirkumar 2011-03-09 17:39:54 Re: ER tool that supports domains and custom types?