Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

SQL combinnig columns

Name: Anonymous 2007-07-30 3:47 ID:6xYTzvIk

Heyaa SQL-wizards. How do i combine two columns into one? Firstname and Lastname -columns need to be combined as Name -column. Databases previous user fucked up with tableformats and this table contains more than 900 names....

Name: Anonymous 2007-07-30 6:27 ID:ke1hBn5l

Create the Name column and run:

MySQL: UPDATE YourTable SET Name = CONCAT( Firstname, ' ', Lastname )
Oracle: UPDATE YourTable SET Name = Firstname || ' ' || Lastname
MSSQL: UPDATE YourTable SET Name = Firstname + ' ' + Lastname

etc

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List