I have two tables.
tbl1
id int(11) NOT NULL
userName varchar(45) NOT NULL
positionName varchar(20) NULL
positionId int(11) NULL
tmpTbl1
id int(11) NOT NULL
userName varchar(45) NOT NULL
positionName varchar(20) NULL
positionId int(11) NULL
In tbl1, only id and userName columns have data. for tmpTbl1, all columns have data.
I want to copy positionName and positionId of tmpTbl1 to tbl1.
Both tables have same structures and id and userName columns data are same too. Just want to update the left two columns data into tbl1.
Thanks ahead.
Tested quickly – but I think this will work for you