VB and VBA Users Source Code: Tip: Limiting a Query Row Count in Sql Server, Oracle, Sybase and MySql
[
Home
|
Contents
|
Search
|
Reply
| Previous | Next ]
VB/VBA Source Code
Tip: Limiting a Query Row Count in Sql Server, Oracle, Sybase and MySql
By:
Andrew Baker
Email (spam proof):
Email the originator of this post
Date:
Friday, September 23, 2005
Hits:
2678
Category:
Database/SQL/ADO
Article:
Here's something I needed today... I wish this was standarized, but it is not, so here are some examples: SQL Server: SELECT TOP 10 product, descr, email FROM products Sybase: SET ROWCOUNT 10 SELECT product, descr, email FROM products SET ROWCOUNT 0 ORACLE: SELECT product, descr, email FROM products WHERE ROWNUM <= 10 MySQL: SELECT product, descr, email FROM products LIMIT 10
Terms and Conditions
Support this site
Download a trial version of the Excel Workbook Rebuilder