Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how u can find the n row from a table?

Answers were Sorted based on User's Feedback



how u can find the n row from a table?..

Answer / santosh kumar

SELECT EMPLOYEE_ID,LAST_NAME,SALARY,DEPARTMENT_ID
FROM (SELECT ROWNUM
R,EMPLOYEE_ID,LAST_NAME,SALARY,DEPARTMENT_ID FROM EMPLOYEES) A
WHERE A.R=&Record_Number;

---------------------------------------------
(This is easy method to find nth record from a table).....

Is This Answer Correct ?    30 Yes 5 No

how u can find the n row from a table?..

Answer / pardeep rajan

kindly give a delete option for the users to delete wrong
answer. administrator also should verify the answers regularly

Is This Answer Correct ?    25 Yes 3 No

how u can find the n row from a table?..

Answer / manish singhania

select * from emp where rownum<=n
minus
select * from emp where rownum<n

n=1,2,......so many

Is This Answer Correct ?    4 Yes 0 No

how u can find the n row from a table?..

Answer / rama krishna

If you want nth record from table employee then..

select * from employee where rownum <= n
minus
select * from employee where rownum < n

the above query will suffice.

Is This Answer Correct ?    3 Yes 1 No

how u can find the n row from a table?..

Answer / rishab

select emp_name,salary,rownum from
(select emp_name,salary,r from
(select salary,emp_name,rownum r from
(select salary,emp_name,rownum
from emp
order by salary desc)
order by r)
where r<4 ---- this number must be n+1
order by salary)
where rownum=1;
-- yes rownum=1 works...

Is This Answer Correct ?    4 Yes 3 No

how u can find the n row from a table?..

Answer / santosh dwivedi

select * from
(
select rownum r,a.* from TableName a
)
where r=n'th

Is This Answer Correct ?    5 Yes 4 No

how u can find the n row from a table?..

Answer / guest

select rowid,[optional columns...] from table where
rowid='n';
--n would be the input from the user which will let you
identify the row number of that particular record

Is This Answer Correct ?    1 Yes 0 No

how u can find the n row from a table?..

Answer / vijayshanker

SELECT EMPLOYEE_ID,LAST_NAME,DEPARTMENT_ID
FROM (SELECT ROWNUM
R,EMPLOYEE_ID,LAST_NAME,DEPARTMENT_ID FROM EMPLOYEES) A
WHERE A.R=&Record_Number;

Is This Answer Correct ?    1 Yes 0 No

how u can find the n row from a table?..

Answer / pradeep

try this works in mysql

select * from table_name limit n-1,1;

Is This Answer Correct ?    1 Yes 0 No

how u can find the n row from a table?..

Answer / abhishekjaiswal

select * from employees where rownum<=&nth_row
/

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

I have done oracle 10g. I need a project knowledge. So if u please send a project how it should be done,Or you can send email link. I will be very grateful to u.

1 Answers  


What is procedure in pl sql?

0 Answers  


How would you convert date into julian date format?

0 Answers  


how to create object in plsql

2 Answers   TCS,


What is the function that is used to transfer a pl/sql table log to a database table?

0 Answers  


What will you get by the cursor attribute sql%rowcount?

0 Answers  


What are the syntax and use of the coalesce function?

0 Answers  


what is Hash join?how it is different from inner join?what is the sign used for inner join?(eg: like the (+) sign used for outer join)?

3 Answers   TCS,


What is sql partition?

0 Answers  


Easy way to convert tableau "IF - ELSEIF" statements to Netezza "CASE" statements.

1 Answers   CTS,


Is it important to partition hard disk?

0 Answers  


What is a data manipulation language?

0 Answers  


Categories