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

what are the differences between char and nchar? : Sql dba

0 Answers  


What is the cause of mutating table error and how can we solve it?

0 Answers  


What is the difference between explicit and implicit cursors in oracle?

0 Answers  


What is auto increment?

0 Answers  


when a procedure /package is getting invalidated?

4 Answers   TCS,


What is a constraint? Tell me about its various levels.

0 Answers  


What is the use of a view in sql?

0 Answers  


How do I write a sql query in pgadmin 4?

0 Answers  


Differences between Oracle 9i and 10g (Probably in terms of SQL and PL/SQL)?

0 Answers   IBM,


Can instead of triggers be used to fire once for each statement on a view?

0 Answers  


how to return query output in html format? : Sql dba

0 Answers  


What is the difference between delete and truncate commands?

0 Answers  


Categories