Web Hosting Talk







View Full Version : MySQL query


jtrovato
11-13-2002, 06:13 PM
update locations set location_contact = location_contact+' '+delete2, delete2=''

I want be able to combine the 2 fields into one. using just MySQL queries.

Location_contact - which is the first name
delete2 - which is the last name

location_contact to equal = location_contact+" "+delete2

I do not know how to add strings together...

John

MarkIL
11-13-2002, 06:23 PM
UPDATE locations SET location_contact=CONCAT(location_contact,delete2), delete2 = NULL;

jtrovato
11-13-2002, 06:29 PM
thank you for the help....