Click here to Skip to main content
15,886,703 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi..
I need Mysql Query where i can insert data into one table from multiple tables.(No Primary Key)

Thanks
Posted

1 solution

Hi,

try this one:

insert into MyTable3(Field1, Field2) (select a.Field1, b.Field from MyTable2 as a, MyTable3 b where [EXPRESSION])

http://dev.mysql.com/doc/refman/5.0/en/insert-select.html[^]

Regards
Robert
 
Share this answer
 
Comments
Sridhar Patnayak 3-Feb-12 11:32am    
Good answer and link 5+
Kanasz Robert 3-Feb-12 12:42pm    
Thank's for vote :)
swapnilKumbhar 3-Feb-12 11:55am    
yes it is..nice simple query he shown.
thanks helping hands
Kanasz Robert 3-Feb-12 12:42pm    
I hope that this post will help you to solve your problem. If you have any other questions, just write :)
swapnilKumbhar 4-Feb-12 7:55am    
i need urgent help on crystal report :|see mu Ques below

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900