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

Joining two columns (fields) ?

User, date Message
Written by westmatrix
6 years ago
Category: General
82 posts since Wed, 11 Apr 07
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
Written by westmatrix
6 years ago
82 posts since Wed, 11 Apr 07
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.