364,111 Members | 2029 Browsing Online
Community for Developers & IT Professionals
Bytes IT Community

Combining two fields data into one field in the same table

sagarbaswa
P: 1
I Want To Combine The First Name Field And The Last Name Field Into One Single Field In The Same Table
Sep 6 '07 #1
Share this Question
Share on Google+
9 Replies


mwasif
Expert 100+
P: 782
Moved to MySQL Forum which is the right palce to ask the question about MySQL.

Kindly use the capital letters appropriately when posting.
Sep 6 '07 #2

mwasif
Expert 100+
P: 782
If you only want to display the name after combining the fields then simply use in this manner
Expand|Select|Wrap|Line Numbers
  1. SELECT CONCAT(first_name, ' ', last_name) AS full_name FROM table_name;
But if you want to save them in a separate field then use UPDATE query to update all the records in the table.
Expand|Select|Wrap|Line Numbers
  1. UPDATE table_name SET
  2. full_name = CONCAT(first_name, ' ', last_name);
But why you want to save them in a separate field as you can display then as a single field in SELECT statement.
Sep 6 '07 #3

salesad
P: 5
Moved to MySQL Forum which is the right palce to ask the question about MySQL.

Kindly use the capital letters appropriately when posting.
HOW MERGE IN TWO FIELDS IN A SAME TABLE
Dec 31 '07 #4

salesad
P: 5
Moved to MySQL Forum which is the right palce to ask the question about MySQL.

Kindly use the capital letters appropriately when posting.
HOW MERGE IN TWO FIELDS IN A SAME TABLE IN POSTGRESQL
Dec 31 '07 #5

salesad
P: 5
Merge Two Fields In Same Tale In Postgresql Database
Dec 31 '07 #6

salesad
P: 5
Merge Two Fields In A Same Table
Dec 31 '07 #7

salesad
P: 5
How To Merge Two Fields In Same Table In
Postgresql
Dec 31 '07 #8

mwasif
Expert 100+
P: 782
Moved to PostgreSQL Forum.
Jan 3 '08 #9

rski
Expert 100+
P: 627
select filed1 || ' '|| field2 from tabelame;
Jan 3 '08 #10

Post your reply

Help answer this question



Didn't find the answer to your PostgreSQL Database question?

You can also browse similar questions: PostgreSQL Database