php - How can i use SQL Select Insert to copy rows from one table to another -


Hey guys to copy from a select query all the rows of a row is a dream and put in the second table trying to.

desc wp_rg_lead_detail

My query After running this result lets you choose the query from wp_rg_lead.id, wp_rg_lead.created_by, wp_usermeta.meta_key, wp_usermeta.meta_value, wp_usermeta.user_id wp_rg_lead interior wp_usermeta wp_rg_lead.id On = wp_usermeta.user_id where wp_usermeta .meta_key = 'parents_id' and wp_rg_lead.id = 12; query result

If you want to select an existing table, use the following format:

  in Gantwy_ table INSERT (column 1, column 2, etc ...) wp_rg_lead Wp_rg_lead.id = wp_usermeta.user_id where .wp_usermeta.meta_key = 'parents_id' and wp_rg_lead.id = 12; w,  

Alternatively, if you want to select them in the new table of a brand, then you can use this format to create the table, then enter the value:

< Pre> SELECT wp_rg_lead id, wp_rg_lead.create_by, wp_usermeta.meta_key, wp_userm_id_value, wp_usermeta.user_id wp_rg_lead from wp_rg_lead.id at wp_rg_lead.id = wp_usermeta.user_id at destination_table wp_usermeta.meta_key = 'parents_id' and wp_rg_lead. Id = 12;

In either query, you must change destination_table to a new table name. You also need to supply column names well in the first query.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -