I want to know last five transactions or records from emp
table, from now?
Answer Posted / 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 View All Answers
How do I count records in sql?
How do I trace sql profiler?
how many triggers are allowed in mysql table? : Sql dba
what are the 'mysql' command line options? : Sql dba
What is difference between sql function and stored procedure?
How many functions are there in sql?
What are the packages in pl sql?
How to fix oracle error ora-00942: table or view does not exist
What is memory optimized table?
Which sql statement is used to return only different values?
What do you understand by exception handling in pl/sql?
Which sorts rows in sql?
how to fetch alternate records from a table? : Sql dba
Write a query to display the current date in sql?
What is pl/sql language case sensitive?