Sorry guys, asking simple question for which i don't have the solution. please help me.

Can you modify my query to return single column with both name and sname ?(rename the column if required)

select name, sname from claim,CV where claim.num=cv.cnum

Recommended Answers

All 2 Replies

Please try-

select name+' '+sname as fullname from claim,CV where claim.num=cv.num

regards

Member Avatar for 1stDAN

MySQL has concat() function, which can be applied in such a manner:
select concat(name, ', ', sname) as nsn from ...

btw, why do you join table claim with CV? Obviously name and sname exist in only one of both tables (if not, they would have been qualified with the table's name where they are contained in, like CV.name).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.