Submitted Questions

  • How do you display last 5 records in DB2?

    madhavan

    • Mar 10th, 2014

    SELECT * FROM Table_Name order by column_name desc Fetch first 5 rows only;

    Mohit

    • May 28th, 2012

    There is nothing called "fetch last n records only" in db2...

    You can use select col1 from table1 order by col1 desc fetch first 5 records only