Course Content
SQL SERVER
About Lesson
–Replicate(value,no)-Repeats the given string, for the specified number of times.
select replicate(‘SIRCL’,3); 
select fname,lname, 
case 
when lname is null then
REPLICATE(fname+’ ‘,2)
when fname is null then
REPLICATE(lname+’ ‘,2)
else
concat(fname,’ ‘,lname)
end FullName
from tblemp;
/*
Syntax :
case 
when condition then
   …..
when condition then
   ….
else 
   ……
end
Create a SalaryGrade of employees 
sal 
> 1Lac => A Grade
>50000 => B Grade
>25000  => C
>5000 => D
else E grade
 
A computed column is computed from an expression that can use other columns in the same table.
Total
Percentage
 
students
RollNo Name Hindi Eng Math Sci SST Total Percentage
 
 
Division 
Per>=80 Merit
Per>=60 First
Per>=50 Second
Per>=40 Pass
otherwise fail
*/