In SQL server float datatype does not display leading zeros after decimal point
declare @num as float set @num=5.20 select @num
will dispaly only
But i want it to display as
After a little research i found that it can be solved by using
select CAST(@num AS numeric(10,2))
But this is not the solution i am expecting. Is there any method like setting datatype or changing datatype so that i can achieve the same?(It will be better if any variants are there in float which can do the same)
If it is possible then i need not change the SQL statement and include cast etc. So please help me on this.