sqlsql-serverstringselectsingle-quotes

How to add single inverted comma after column name


enter image description here

I want to print the statement like [Emp_name's salary is .....] ex.- Aniket's salary is...

What will be the syntax for this?

I have tried this SQL:

select empname + 's''salary is' + cast(salary as varchar) 
from emp

but it's not working


Solution

  • select empname+ '''s salary is' + cast(salary as varchar) from emp