Page 1 of 1

inserting values from other table.

Posted: Wed Aug 25, 2010 2:47 pm
by unknown_krasher
hi guys, i have problem selecting and inserting values from tables in mysql. I have this two tables named facility and activity both have id where i need to get and insert it into my reservation table. how will i do that? please help..

Re: inserting values from other table.

Posted: Wed Aug 25, 2010 2:52 pm
by bradbury
I'm not sure that I completely understood your problem are you trying to just copy the data in one database to another? or just certain values? Either way all you have to do is

Code: Select all

"INSERT INTO db_you_want_info_to_be_copied_to
		SELECT *
		FROM db_you_want_to_copy"