我正在尝试插入一个计数,但我得到了错误
关键字“SET”附近的语法不正确。
我是以错误的方式解决这个问题吗?
INSERT INTO Timestamp_ActiveReferralscopy
SET count = (select count(HashID)
from [dbo].[T_PTID]
where date_of_Death is null AND Deduction_Date is null)
答案 0 :(得分:1)
这就是你要找的东西吗?
INSERT INTO Timestamp_ActiveReferralscopy (count)
select count(HashID) from [dbo].[T_PTID]
where date_of_Death is null AND Deduction_Date is null
...