Sergey Gigoyan
2013-02-12 07:05:20 UTC
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'
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'