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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -