Pankaj Kumar
Pankaj Kumar

Reputation: 685

Max and Selection of multiple columns in the same Query Oracle

Could anybody tell me that how can I achieve this Query in oracle

select column1, columns2, max(rownumber) from table where .....;

Explanation: Select Query is so complicated and I need max to give UI Side "total count" of the record for paging and i will send the data only 20 or 30 records based on the paging size not full record.

Upvotes: 0

Views: 181

Answers (1)

user330315
user330315

Reputation:

Use a window function:

select column1, columns2, 
       count(*) over () as total_count
from table 
where .....;

Upvotes: 2

Related Questions