Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 test_reports 下使用以下表结构运行以下查询
Table_Name 日期(当前时间戳) Total_Count
INSERT INTO test_reports SELECT "table1", "date", COUNT(*) from `table1`;
除了时间戳未更新并保持 00:00:00 之外,上述工作正常
如果根据定义将日期列设置为CURRENT_TIMESTAMP,则可以将其关闭。
CURRENT_TIMESTAMP
INSERT INTO test_reports (Table_Name, Total_Count) SELECT "table1", COUNT(*) FROM table1