how u can find the n row from a table?
Answers were Sorted based on User's Feedback
Answer / a.brahmam
select * from(select rownum r,column name,from table name)
where r=&n;
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / rashmi
select max(rownum) from table1 where rowid is not null
| Is This Answer Correct ? | 2 Yes | 3 No |
Answer / kris17.danger
SELECT * FROM ( SELECT ROWNUM R , A.* FROM TABLE_NAME A )
WHERE R=N;
Herer N is the number of row which need to be find.
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / manoj gogoi
select a2.*
from
(select rownum r,a1.* from a a1)a2
where a2.r=&Any_Row_U_Want
| Is This Answer Correct ? | 0 Yes | 2 No |
Answer / guest
select rownum,ename,sal,empno from(select ename,sal,empno from
table_name order by sal) group by rownum,ename,sal,empno
having rownum=(select count(*) from table_name
| Is This Answer Correct ? | 10 Yes | 13 No |
Answer / karunakar
select *
from employees
where rowid=(select max(rowid) a
from employees)
| Is This Answer Correct ? | 1 Yes | 5 No |
Answer / monika
select employee_id,last_name,salary
from employees
where rownum < n
ORDER by salary
| Is This Answer Correct ? | 0 Yes | 11 No |
How many disk partitions should I have?
What is the purpose of my sql?
What is the command used to fetch first 5 characters of the string?
Define tables and fields in a database
How do you update a table in sql?
Is join same as left join?
Do you understand the meaning of exception handling?
what is the difference between cursor FETCH and FOR LOOP ?
3 Answers CG-VAK, Tech Mahindra,
What are different methods to trace the pl/sql code?
I have a small PL/SQL Block assume in this way begin select * from emp where empno=100; exception when others then <Some Messages> when no_data_found then <Some Messages> when too_many_rows then <Some Messages> end; The question which he asked was whether this block will get executed normally or it will throw error ? If errored out then what is the reason for the error ? Could anybody please help me ? Regards Nakul Venkataraman
How many databases can sql express handle?
What is sql query optimization?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)