-1

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

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • 2
    "not working" is not a good problem description. Do you get any errors? Then please include them. Is the output not what you want? Then show and explain that – Hans Kesting Apr 15 '23 at 06:12

1 Answers1

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