我有两个表t_1,t_2,共有一个相同字段mitem,现在我要把两个表按这个字段关联,把t_1的dj字段的内容赋给t_2的dj字段,如何写语句?
我用如下语句不成功,提示the column prefix 't_1' doesn't match with a table name or alias name used in the query
update t_2
set t_2.dj=t_1.dj
where t_1.mitem=t_2.mitem
...全文
393打赏收藏
SQL里update的使用问题
我有两个表t_1,t_2,共有一个相同字段mitem,现在我要把两个表按这个字段关联,把t_1的dj字段的内容赋给t_2的dj字段,如何写语句? 我用如下语句不成功,提示the column prefix 't_1' doesn't match with a table name or alias name used in the query update t_2 set t_2.dj=t_1.dj where t_1.mitem=t_2.mitem