How to print the value with desired text in TSQL using sql server 2005 -


i want select value customers datatable. have been asked question in interview.

select cust_name customers cust_id=5; 

will result naresh.

now want print value as

customer name naresh 

how can print value this.thank you

select 'customer name ' + cust_name customers cust_id=5; 

or

declare @customername varchar(50) select @customername = cust_name customers cust_id=5; print 'customer name ' + @customername ; 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -