i use a MS access database. if i a have 20 record in my database. what is the query when i want only 10 record to display?
Sql Query
Collapse
X
-
Originally posted by xtianixmi use a MS access database. if i a have 20 record in my database. what is the query when i want only 10 record to display?
Hi,
Here you do not mention what 10 records, first or last. For my method, you have to add an extra field that indicates the original position or number of data in those records. Then you can do that by WHERE clause. You can use like this 'WHERE ID<11'.
Get Better.
Regards,
shuvo2k6 -
You use the TOP clause in SQLOriginally posted by xtianixmi use a MS access database. if i a have 20 record in my database. what is the query when i want only 10 record to display?
SELECT TOP 10
which in Access equates to right clicking in the query designer where the tables are and selecting the properties box where you will see the property called 'Top Values' insert there the number of rows you wish to retrieve. You will only get the number of rows you state and it will be the first 10 rows if that is your stipulation. How you sort and sift using criteria is a different matter
Regards
Jim :)Comment
Comment