NUmber of rows in Oracle SQL Select?

Posted by twelshesgi on Stack Overflow See other posts from Stack Overflow or by twelshesgi
Published on 2010-05-21T17:28:58Z Indexed on 2010/05/21 17:30 UTC
Read the original article Hit count: 136

Filed under:
|
|
|

I need to nkw how many records were returned in a select in oracle. Currently, I do two queries:

SELECT COUNT(ITEM_ID) FROM MY_ITEMS;

SELECT * FROM MY_ITEMS;

I need to know the COUNT but I hate doing two queries. Is there a way to do:

SELECT * FROM MY_ITEMS 

and then find out how many records are in there?

© Stack Overflow or respective owner

Related posts about sql

Related posts about Oracle