Using Case Statement in sqlserver
Select Id,Name=case when Name='a' then 'x' else Name end from tbl_Testing
Changing the datatype of the column for displaying
Select Id,convert(decimal(10,2),sal) as sal from tbl_Testing
Select Id,Name=case when Name='a' then 'x' else Name end from tbl_Testing
Changing the datatype of the column for displaying
Select Id,convert(decimal(10,2),sal) as sal from tbl_Testing
No comments:
Post a Comment