This E-Mail is sent in confidence for the addressee only. Unauthorised recipients must preserve this confidentiality and should notify the sender immediately by telephone on 0131-655-6789 and must delete the original E-Mail without taking a copy. If you are not the addressee you must not copy, distribute, disclose or use any of the information in any way.
This E-Mail is not intended nor should it be taken to create any legal relations, contractual or otherwise. We have taken all reasonable precautions to ensure that no viruses are transmitted from the Scottish Widows Group of companies to any third party. Scottish Widows accepts no responsibility for any loss or damage resulting directly or indirectly from the use of this E-Mail or the contents. ***************************************************************************** Shaunn, If we're talking DB2 for LUW here then you can do - SELECT * FROM T_TABLE FETCH FIRST 10 ROWS ONLY OPTIMIZE FOR 10 ROWS ; The last clause, although it shouldn't really be necessary, needs to be there for performance reasons (you and I can work out if you ask to fetch 10 rows then you should probably optimize for that number, but apparently the DB2 optimizer on LUW can't). If you want a particular 10 rows you'll need an ORDER BY clause. Phil -----Original Message----- From: Johnson, Shaunn [mailto:[EMAIL PROTECTED] Sent: 20 January 2004 15:50 To: [EMAIL PROTECTED] Subject: [DB2EUG] return limited amount of records Howdy: Is there a way to return only a limited amount of records when running a query? Example, in Oracle, I can: [snip] select * from t_table where rownum < 10 ; [/snip] Is there something similar in DB2? Thanks! -X ***************************************************************************** Visit the Scottish Widows website at www.scottishwidows.co.uk Scottish Widows Group includes the following companies:- Scottish Widows plc, Company No. 199549. Authorised & Regulated by the Financial Services Authority. Scottish Widows Annuities Limited, Company No. 199550. Authorised & Regulated by the Financial Services Authority. Scottish Widows Services Limited, Company No. 189975. The Registered Office of all of the above companies is in the United Kingdom at 69 Morrison Street, Edinburgh, EH3 8YF. Telephone: 0131 655 6000 Scottish Widows Unit Trust Managers Limited, Company No. 1629925 Registered Office: is in the United Kingdom at Charlton Place, Andover, Hampshire SP10 1RE. Telephone: 0845 300 2244 Authorised & Regulated by the Financial Service Authority. Scottish Widows Investment Partnership Limited, Company No. 794936 Registered Office : is in the United Kingdom at 10 Fleet Place, London EC4M 7RH. Telephone: 0131 655 8500 Authorised & Regulated by the Financial Services Authority. Scottish Widows Fund Management Limited, Company No. 74517. Authorised & Regulated by the Financial Services Authority. Pensions Management (SWF) Limited, Company No. 45361. Authorised & Regulated by the Financial Services Authority. The Registered Office of the above two companies is in the United Kingdom at 15 Dalkeith Road, Edinburgh, EH16 5BU. Tel 0131 655 6000 The companies listed above are members of the Scottish Widows and Lloyds TSB Marketing Group- Scottish Widows Bank plc, Company No. 154554 Registered Office: is in the United Kingdom at 67 Morrison Street, Edinburgh, EH3 8YJ. Telephone: 0845 845 0829 Authorised & Regulated by the Financial Services Authority Hill Samuel Unit Trust Managers Limited, Company No 406604 Registered Office: is in the United Kingdom at 10 Fleet Place, London, EC4M 7RH Telephone: 0800 336600 Authorised & Regulated by the Financial Services Authority Hill Samuel Asset Management International Limited, Company No 106723 Registered Office: is in the United Kingdom at 15 Dalkeith Road, Edinburgh, EH16 5BU Telephone: 0131 655 8500 Authorised & Regulated by the Financial Services Authority All of the above companies are part of the Lloyds TSB Group. - ::: When replying to the list, please use 'Reply-All' and make sure ::: a copy goes to the list ([EMAIL PROTECTED]). *** To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED] *** For more information, check http://www.db2eug.uni.cc
