SQL 服务器:table 更改跟踪
SQL Server : table change tracking
我有以下 tables 并且想跟踪 DishButton
table 中发生的变化。如果添加或删除了按钮,以及何时完成。
有人可以指点一下吗?
select DishID, DishName, Price
From DishTable
Select ButtonID, ButtonName
From ButtonTable
Select DishButtonID, DishID, ButtonID
From DishButtons
一道菜可以有多个按钮。删除按钮后,记录将从 table 中删除。如果添加了按钮,则会插入一条新记录。
有一个 table 来跟踪 DishButtons table。编写一个触发器,以便在 DishButtons table.
中发生某些更改时将您需要的所有数据插入到 table 中
我有以下 tables 并且想跟踪 DishButton
table 中发生的变化。如果添加或删除了按钮,以及何时完成。
有人可以指点一下吗?
select DishID, DishName, Price
From DishTable
Select ButtonID, ButtonName
From ButtonTable
Select DishButtonID, DishID, ButtonID
From DishButtons
一道菜可以有多个按钮。删除按钮后,记录将从 table 中删除。如果添加了按钮,则会插入一条新记录。
有一个 table 来跟踪 DishButtons table。编写一个触发器,以便在 DishButtons table.
中发生某些更改时将您需要的所有数据插入到 table 中