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

What is the difference between row level and statement level trigger?

1071


How do I sort a table in sql?

1081


What is the sql case statement?

1053


What steps server process has to take to execute an update statement?

1016


What is a system versioned table?

1040


How can we make an if statement within a select statement?

1067


What is column?

1032


how to add a new column to an existing table in mysql? : Sql dba

1112


Can two tables have same primary key?

1022


How to convert comma separated string to array in pl/sql?

1240


what is “go” in t-sql? : Transact sql

1154


What is pl sql in oracle?

1094


What is benefit of creating memory optimized table?

1032


What are data types in pl sql?

1196


How long it takes to learn pl sql?

1064