How to insert into one column in table using select in phpmyadmin -


i have 2 table below :

users_data:

listing_id | country | keywords 1          | belgium |  2          | usa     |  3          | brazil  | 

temp table:

listing_id | keywords 1          | iqmal 2          | aiman 3          | afiq 

i want insert keywords temp table keywords users_data table. please me.

simple update data using join

update users_data   join temp  on temp.listing_id =users_data.listing_id  set users_data.keywords=temp.keywords; 

for insert follow these steps

1st : can create table same structure

 create table new_table users_data   

2nd : simple select data both table , insert below

insert new_table select users_data.listing_id,users_data.country,temp.keywords   join temp  on temp.listing_id =users_data.listing_id 

Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -