469,322 Members | 1,634 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,322 developers. It's quick & easy.

How to insert the data of one table into the other

seshu
156 100+
Hi everybody
This is seshu here i am struck with one point i want to get the data of one table ie table1 ofcourse not the whole table only two out of five columns and i want to insert those two columns in an empty new table which is having five columns in which two of them are similar to the columns i have selected from table1
please help me out
regards
seshu
Jan 12 '07 #1
1 5080
ronverdonk
4,258 Expert 4TB
As always, the answer is in the MySQL manual, chapter INSERT Syntax

For your problem something like
Expand|Select|Wrap|Line Numbers
  1. INSERT INTO TargetTable (col1, col2, col3)
  2. SELECT col1,col2, col3
  3. FROM SourceTable
  4.  
Ronald :cool:
Jan 12 '07 #2

Post your reply

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

Similar topics

9 posts views Thread by Martin | last post: by
6 posts views Thread by pk | last post: by
16 posts views Thread by Philip Boonzaaier | last post: by
5 posts views Thread by Paul Shaw | last post: by
16 posts views Thread by robert | last post: by
2 posts views Thread by Geoffrey KRETZ | last post: by
8 posts views Thread by nano2k | last post: by
6 posts views Thread by rn5a | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by mdpf | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.