Hi,
I don't think so.
Oracle - 
SQL> select count(*) over () as ROWCOUNT , first_name from people;

  ROWCOUNT FIRST_NAME
---------- 
---------------------------------------------------------------------
-------------------------------
         6 Mary
         6 Mary
         6 John
         6 John
         6 John
         6 Jacob

6 rows selected.

PostgreSQL
postgres=# select count(*) over () as ROWCOUNT , first_name from people;
ERROR:  syntax error at or near "over"
LINE 1: select count(*) over () as ROWCOUNT , first_name from people...
                        ^
Regards,
Jayadevan



From:   Thomas Kellerer <spam_ea...@gmx.net>
To:     pgsql-sql@postgresql.org
Date:   26/03/2010 03:26
Subject:        Re: [SQL] SQL syntax rowcount value as an extra column in 
the result set
Sent by:        pgsql-sql-ow...@postgresql.org



Snyder, James wrote on 25.03.2010 22:33:

> I’m using PostgreSQL (8.4.701)
There is no such version.
The current version is 8.4.3


> On a side note, Oracle allows the following syntax to achieve the above:
>
> select count(*) over () as ROWCOUNT , first_name from people
>
The same syntax will work on Postgres

Thomas


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


DISCLAIMER:   "The information in this e-mail and any attachment is intended 
only for the person to whom it is addressed and may contain confidential and/or 
privileged material. If you have received this e-mail in error, kindly contact 
the sender and destroy all copies of the original communication. IBS makes no 
warranty, express or implied, nor guarantees the accuracy, adequacy or 
completeness of the information contained in this email or any attachment and 
is not liable for any errors, defects, omissions, viruses or for resultant loss 
or damage, if any, direct or indirect." 

Reply via email to