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
Post a Comment