Hello I have table name Student(name,marks,....) I want to write the query that fetch the TOP TEN Students from the Student Table on the basis of their marks regards Faisal [ March 18, 2004: Message edited by: Bear Bibeault ]
You could use a SELECT statement with an ORDER BY clause and then pull off just the first ten rows using a for loop. Alternatively some databases allow you to specify the number of rows to return, as part of the query (e.g. the syntax in SQL Server is SELECT TOP 10 .... In MySQL it comes as the end of the query as ... LIMIT 10). Check out the documentation for your database.
Joined: Mar 13, 2002
thanks for reply but i want sql query for this in oracle please send me the code regards Faisal :roll: