distal-attribute
distal-attribute
distal-attribute
distal-attribute

Joining two columns (fields) ?

westmatrix posted 6 years ago in General
How do I join two columns (fields) in one db table ? - (wish there was a drag & drop function)

Two columns (fields)
usr_name => name
usr_surname => surname
Would like to join them;

name surname in one table called usr_name


Is there a join or merge query that can do this like;

merge usr_name," ",usr_surname into usr_name



Cheers
westmatrix posted 6 years ago
This worked

update tbl_login set usr_name = concat(usr_name,' ',usr_surname)


For future - if anyne needs db help go here first;

http://dev.mysql.com/doc/refman/5.0/en/index.html

http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat


Cheers

Please login to leave a reply, or register at first.