代码之家  ›  专栏  ›  技术社区  ›  Phil Hannent

SQLite更新字段,其中包含来自另一个表的计数

  •  1
  • Phil Hannent  · 技术社区  · 17 年前

    UPDATE 'tblTags'
    SET 'tagUsageCount' =
    (SELECT COUNT(*) FROM 'tblTagLinks'
    WHERE 'tblTagLinks'.'TLTagId' = 'tblTags'.'tagId')
    
    2 回复  |  直到 17 年前
        1
  •  2
  •   laalto    17 年前

    ;

        2
  •  0
  •   Nick Dandoulakis    17 年前

    SQLiteSpy
    'tblTags' --> tblTags