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

quary for
1> fetch last record
2> fetch in reverse order
3> fetch last 5 row
4> fetch second last record (their is no primary key)
i think concept of count can be use for this in 4th

Answer Posted / sudipta

the 4th answer is(ignore the previous one)

db2=> with t1(a,b,c) as (select id,name,row_number()
over(order by id desc) as aa from tab1) select * from t1
where c=2

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

can all users have the privilage to use the sql statement select * (dml)?

1146


What are the benefits of using the db2 database?

1210


On which levels locks can be applied?

1111


what is utility for parm lib

2350


Mention data types used in db2 ?

1142


What is the use of value function?

1128


How to find primary key of a table in db2?

1049


What is db2 catalog database?

1021


What is the cobol picture clause of the db2 data types date, time, timestamp?

1044


What is dbrm? What it contains?

1149


How do I delete a table in db2?

1053


by using cursors , we can access particular records from the table based on some condition, i want to delete those selected records, how can we write a query for this in the program?

9157


How do we specify index to include or not during bind process.

2107


what is diffrence b/w file-aid tool and file-aid utility???

4875


What is syscat in db2?

987