Your host:
Stephen Chapman
Stephen Chapman

Select Top Six

Question: In my data base there are 1000 records. I want to access only the top six records depending on their salary. How to do this?
Soni

Answer:Select all of the records ordered by salary in descending order.


SELECT * FROM mytable ORDER BY salary DESC;

Then just read the first 6 records retrieved.

go to top

Add to del.icio.us

Personal Loan - Guitar Books - Internet Marketing - Phoenix Pools