How to divide query output into groups in oracle?
Answer / Swati Chandra
In Oracle, you can use the analytic functions like ROW_NUMBER() OVER (ORDER BY column_name) to assign a row number to each row in your result set and then use it to group the rows. Here is an example: SELECT * FROM (SELECT column1, column2, ROW_NUMBER() OVER(ORDER BY column_name) as row_num FROM table_name) WHERE row_num % n = 0; This will divide your output into groups of n rows.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is a procedure in oracle?
What is a Tablespace?
How to use "for" statements in oracle?
What is define in oracle?
What is a nested table and how is it different from a normal table?
What query tells you how much space a tablespace named test is taking up, and how much space is remaining?
How to define a specific record type?
Difference between oracle's plus (+) notation and ansi join notation?
WHAT IS ecc 6.0
What is a cursor and what are the steps need to be taken?
Will you be able to store pictures in the database?
List out the types of joins.