I have a table named user
in database named client
. user has the structure as follows:
`fkey`(varchar(100)) | `status`(enum('1','0'))
I have another database named employees
with a table named employee
It has a cloumn named emailid
which has all the data I need.
I want all the emailid column data from employees.employee to be inserted in client.user at fkey column.there is another column status in client.user which needs to be set as 1 .How do I create a query for this.
This is my query but it is wrong.
insert into client.user (`fkey`,`status`) select `emailid` from employees.employee,'1';