【发布时间】:2015-10-29 07:12:35
【问题描述】:
我试图实现的目标是根据另一个表上的值更新值,问题是我必须加入多个列。看看吧:
update excel_attributes
inner join info_columns on
(excel_attributes.source = info_columns.source) and
(excel_attributes.r010_table = info_columns.tableName) and
(excel_attributes.r010_comment = info_columns.comment) and
(excel_attributes.r010_column = info_columns.columnName) and
(excel_attributes.r010_type = info_columns.Datatype)
set excel_attributes.source_id = info_columns.info_columns_id;
还有两倍的列。显然left join 在很多情况下都无济于事(2^numOfCol)。
这就是为什么我想将该值设置为等于而不是 null 以便能够执行inner join。
这样做是可能的,但很无聊:
update excel_attributes
set col = ""
where isnull(col );
有什么想法吗?
【问题讨论】:
标签: sql ms-access null sql-update ms-access-2010