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 to retrieve last tree records from table?
select *from emp where rownum > (select count(*)-3 from
emp);
i am using this query to get last three records from table
but its not giving any output, so please tell me what is the
error in this query.

Answer Posted / alok narayan

Rownum assigned at the runtime on the basis of rownum you
not fetch last three records.

for no records output: Rownum always use <= or >= , if use
rownum < or > its giving no output.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we create table inside stored procedure?

903


Why are aggregate functions called so?

896


Explian rowid, rownum? What are the psoducolumns we have?

945


what are the different tables present in mysql? : Sql dba

922


Is it possible to Restore a Dropped Table using Rollback Command in Oracle SQL Plus ?

1175


write an sql query to find names of employee start with 'a'? : Sql dba

964


What is the use of count (*) in sql?

979


How exception handling is done in advance pl/sql?

917


What are the ways on commenting in a pl/sql code?

1050


Can we enter data in a table in design view?

910


What is a rank in sql?

897


What is the difference between partition and index?

922


Can a foreign key be a duplicate?

858


what is the difference between delete and truncate statement in sql? : Sql dba

1126


Do prepared statements prevent sql injection?

896