Professional Documents
Culture Documents
select getdate()
select convert(varchar,day(getdate()))
select
case @testval
when 1 then 'first'
when 2 then 'second'
when 3 then 'third'
else 'other'
end
select
case
when @testval <=3 then 'top 3'
else 'other'
end
cast(expression as new_data_type)
sum1 = a+b;
console.writeline("the sum1 of elements {0} and {1} is {2}",a,b,a+b);
return sum1;
select charindex('s','srinivasan')
select substring('srinivasan',1,9)
declare @a int
set @a=10
declare @b int
set @b = 20
declare @c int
set @c = @b / @a
print @c