如果你不確定 device_list_log 資料表的欄位
請下完整的INSERT INTO寫法~
因為系統告訴你寫入的欄位數量不對稱~
例如你的是以下方式的錯誤
insert into device_list_log(A,B,C)
select A,B,C,D from Inserted
請問30行(Insert Into devicelistlog Select , N'After Inserted', getdate() From Inserted)的N'After Inserted'是什麼意思? 還有Inserted、deleted這2個table 是哪個?
N'After Inserted' 是devicelistlog 裡面有個欄位紀錄著After Inserted的字串~
關於Inserted、deleted要在你的資料表清單會有~
你查看看~你的資料庫裡面有哪些資料表~
裡面肯定會有Inserted、deleted資料表~
1.檢查 device_list_log 是否有比 Inserted Table 多 2 個欄位
2.用完整的欄位對應試試
INSERT INTO table2 (column1, column2, column3, ...)
SELECT column1, column2, column3, ...
FROM table1
WHERE condition;