Hi, my self Ravi Vishwakarma. I have completed my studies at SPICBB Varanasi. now I completed MCA with 76% form Veer Bahadur Singh Purvanchal University Jaunpur.
SWE @ MindStick | Software Engineer | Web Developer | .Net Developer | Web Developer | Backend Engineer | .NET Core Developer
The names and marks of the top three students are obtained using a SELECT statement. The following SQL statement is used to determine the column in a table's given records with the highest value:
SELECT TOP N * FROM table_name ORDER BY column_name DESC;
You can write the query.
SELECT TOP 3* FROM students ORDER BY marks DESC;
if you want to learn more about databases, for example, Oracle Database you can join
Oracle Online Course and solve these questions easily hope you like this
To find the highest value from given records of column in a table then the following SQL statement is used for it,
SELECT TOP N * FROM table_name ORDER BY column_name DESC;
And find the min value from that table then,
SELECT TOP N * FROM table_name ORDER BY column_name ;(or ASC ;)
Example:
Lets have a database table ‘Students’ that store the record of students.
The following SQL statement is used to find the records of 3 students who get the highest marks.
select top 3 stuName, stuMarks from Students order by stuMarks desc;
Liked By
Write Answer
How to get names and marks of the top three students.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy
Join MindStick Community
You have need login or register for voting of answers or question.
Kirti Sharma
03-Nov-2022We can get name and marks of top 3 students as follows:
SELECT TOP 3 * FROM table_name ORDER BY column_name;
Shivani
01-Oct-2022The names and marks of the top three students are obtained using a SELECT statement. The following SQL statement is used to determine the column in a table's given records with the highest value:
SELECT TOP N * FROM table_name ORDER BY column_name DESC;
You can write the query.
SELECT TOP 3* FROM students ORDER BY marks DESC;
if you want to learn more about databases, for example, Oracle Database you can join Oracle Online Course and solve these questions easily hope you like this
Ashutosh Kumar Verma
23-Sep-2021SQL SELECT Highest value:
To find the highest value from given records of column in a table then the following SQL statement is used for it,
SELECT TOP N * FROM table_name ORDER BY column_name DESC;
And find the min value from that table then,
SELECT TOP N * FROM table_name ORDER BY column_name ;(or ASC ;)
Example:
Lets have a database table ‘Students’ that store the record of students.
The following SQL statement is used to find the records of 3 students who get the highest marks.
select top 3 stuName, stuMarks from Students order by stuMarks desc;