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...


I want to know last five transactions or records from emp
table, from now?

Answers were Sorted based on User's Feedback



I want to know last five transactions or records from emp table, from now?..

Answer / prakash r

Hi,

Please try the below query

Table
------
create table TEMP_SEARCH
(
F1 VARCHAR2(100),
F2 VARCHAR2(100),
F3 VARCHAR2(100)
)

select * from TEMP_SEARCH

Rownum F1 F2 F3
-----------------------------
1 1 500 DES1
2 2 600 DES2
3 3 550 DES3
4 4 760 DES4
5 5 899 DES5

select * from temp_search
minus
(select * from temp_search where rownum < (select count(*) -
2 from temp_search))

This will give the last two transaction

Is This Answer Correct ?    2 Yes 7 No

Post New Answer

More SQL PLSQL Interview Questions

Tell me what a package consists of.

3 Answers  


if table named a is there and 4 records are there then how to swap (1 and 3) and (2 and 4) records at a time

1 Answers  


How to look at the current sql*plus system settings?

0 Answers  


what is the difference between char and varchar data types? : Sql dba

0 Answers  


what is SCALAR Queries?

2 Answers   ITC Infotech,


is it necessary to write group by and order by clause together

3 Answers   HCL, Wipro,


write an sql query to get third maximum salary of an employee from a table named employee_table. : Sql dba

0 Answers  


What is difference between table and view?

0 Answers  


Can we use the cursor's to create the collection in PL/SQL?

0 Answers   MCN Solutions,


what is the difference between implicit conversions and explicit conversions?

2 Answers  


HP Interview -2016 Unix 1) grep command in unix 2) what is set command

1 Answers   HCL,


What is the starting oracle error number?

0 Answers  


Categories