0

我正在建立一个新数据库,我需要将concatenate另一个表中的 2 列添加到 1 列。

我已经试过了HeidiSQL。我的代码有错误吗?

UPDATE annotationfile
SET LABSDTM = CONCAT_WS('T',importfile.Collection_Date, importfile.Collection_Time)  ;

这是错误消息:

字段列表中的“未知列 'importfile.Collection_Date'”。

我 100% 确定字段列表确实存在。

4

1 回答 1

1

您需要加入 import ,您的查询应该看起来更像这样

UPDATE annotationfile join import on something 
SET LABSDTM = CONCAT_WS('T',importfile.Collection_Date, importfile.Collection_Time) 
;
于 2019-01-29T14:49:14.280 回答