php - Inserting values to another table -


i have check if namesfroma tablea exist in namesfromb tableb using code.

select * tablea inner join tableb on(namefroma = namefromb) 

and able output names exist. want store names exist in both table table named "existed" , column "name". should this.

simply use insert ... select statement.

insert existed (existed.name) select a.name tablea inner join tableb on(namefroma = namefromb) 

see official mysql documentation more details.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -