Row Count - Mailing list pgsql-novice

From Sergey Gigoyan
Subject Row Count
Date
Msg-id CAFaFzo6uSe8Q0Y9tzfQk_rBxSnQy+Z-CNmbTjXNEJ=QBFOf8XQ@mail.gmail.com
Whole thread Raw
Responses Re: Row Count
Re: Row Count
Re: Row Count
List pgsql-novice
How can I get selected row count in one statement?
For example, I can do that by two select statements

select id, name, addrress, (select count(*) from(select id
                                                                     from users
                                                                      where name<>'examplename')
from users
where name<>'examplename'

or

declare rowcount integer
...............
rowcount:=select count(*) from(select id
                                               from users
                                                where name<>'examplename') as rst

select id, name, address, rowcount as rowcount
from users
where name<>'examplename'

pgsql-novice by date:

Previous
From: Jack Kaufman
Date:
Subject: Re: Function name
Next
From: Thomas Kellerer
Date:
Subject: Re: Row Count