Computer Science, asked by Nithyagokulapriya, 1 month ago

Write a query to display the name of students whose id is other than 4 and 7 from student table.Order the result by student name in ascending order.

Answers

Answered by harshithamethukula
12

Explanation:

select student_name from student where student_id NOT IN(4,7) order by student_name;

Answered by AditiHegde
0

SQL query.

  • Write an SQL query to display the name of students id's other than 4 and 7 from the 'students' table in ascending order.

Here we need to get the names and IDs of all the students except 4 and 7.

And we need to order the result by student name in ascending order.

So we can write the query as:

Select name from student where id not in(4,7) order by name asc;

Thus all other students id's except 4 and 7 will be displayed on the student table.

#SPJ3

Similar questions