I have one table Student .So i want to fetch data according to percentage
and give remark according to position .
set @no=0 ;
select
@no:=@no+1 as S_No
,name,percentage,
CASE WHEN percentage >= 90 Then 'excellent'
WHEN percentage >=60 then 'first'
WHEN percentage >=59 then 'second'
When percentage >=35 then 'third'
else 'Fail' end as Remark
from student
No comments:
Post a Comment