SQLite用于连接表

时间:2009-09-17 20:53:58

标签: sql sqlite

如何将以下语句从MySQL-ese转换为SQLite-ese?

UPDATE Attribute, Name 
  SET Attribute.AttValue = 'foobar'
  WHERE Attribute.NameID = Name.NameID 
    AND Name.Name = 'rotate_ccw'

看起来SQLite不支持UPDATE statement中的联接。

1 个答案:

答案 0 :(得分:5)

UPDATE Attribute
  SET Attribute.AttValue = 'foobar'
  WHERE Attribute.NameID = (SELECT Name.NameID FROM Name WHERE Name.Name = 'rotate_ccw')