You are viewing a single comment's thread. Return to all comments →
this will also work for mysql
select (case when grade <8 THEN NULL ELSE name END) name, grade, marks
where marks between min_Mark and Max_Mark
order by grade desc, name, coalesce(name,marks);
@rupalvshinde the coalesce in the end might not work as both the column name and marks have different data type.
why use coalese() function