Question about UPDATE data in another table in MySQL?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
3 views
Have a table table1 with fields (A,B,C) table2 (D,B,C), A and D strings

I want to update table1 so (I use phpMyAdmin)


UPDATE atm

SET

table1.B = table2. B

WHERE

table1.A=table2.D


When you run get an error that, say, table2.In the unknown column.

How to overcome?

Thanks in advance.
by | 3 views

1 Answer

0 like 0 dislike
Sure everything copied correctly? You have to query table2.B does not appear at all :)
Try this: UPDATE table1, table2 SET...
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
27,859 users