By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,156 Members | 1,071 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,156 IT Pros & Developers. It's quick & easy.

Combining two fields data into one field in the same table

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: 801
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: 801
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

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

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

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

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

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

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

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

Post your reply

Sign in to post your reply or Sign up for a free account.