我试图使用innjer连接执行关系更新,似乎无法使语法正确.
@H_502_14@
我相信这是正确的语法:
行如下:
Catalogue.Category_ID Catalogue.Visible Categories.Category_ID Categories.Category_Name
我试图在类别ID号匹配时更新可见字段的值,并对应正确的名称.
UPDATE `Catalogue` SET `Visible` = '0' FROM `Catalogue` INNER JOIN `Categories` ON Catalogue.Category_ID = Categories.Category_ID AND Categories.Category_Name = 'Bases'
UPDATE `Catalogue` INNER JOIN `Categories` ON Catalogue.Category_ID = Categories.Category_ID AND Categories.Category_Name = 'Bases' SET `Visible` = '0'