insert identification or id?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
jayson.ph
Forum Contributor
Posts: 165
Joined: Mon Jan 02, 2012 9:20 am
Location: MP
Contact:

insert identification or id?

Post by jayson.ph »

Hi all,

i have two tables, btl_1 and tbl_2.

in tbl_1-> i have id,name and fname which is already have a record. while in tbl_2-> i have id,address and school. which is no record yet. and now how can i get the id from tbl_1 into tbl_2,

please help.. very needed
pbs
Forum Contributor
Posts: 230
Joined: Fri Nov 07, 2008 5:31 am
Location: Nashik, India
Contact:

Re: insert identification or id?

Post by pbs »

Use mysql INSERT_ _ _ _SELECT query

Refer : http://dev.mysql.com/doc/refman/5.0/en/ ... elect.html
Post Reply