Joining two columns (fields) ?

[expired user #1919]'s profile image [expired user #1919] posted 16 years ago in General Permalink
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
[expired user #1919]'s profile image [expired user #1919] posted 16 years ago Permalink
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.