当前位置:网站首页>SQL SERVER on master-slave table trigger design
SQL SERVER on master-slave table trigger design
2022-08-05 07:54:00 【CSDN Q&A】
There are two two tables, A and B relationship is a master-slave table.
A table has two fields, date and number.
Table B has four fields of date and specification and number and quantity.
The number field of the two tables is an association relationship.
Currently A's data is triggered from other tables.Then add table B according to the data of table A.(It means that there is a load of goods in table A, and I want to slowly classify table B), and then the next step I need is to summarize the data in table B into table C by date and specification, and there must be two summaries,One label is injected into the library, and the other is labeled out of the library.
I have tried to write triggers in table B, but if table B adds a record, table C will add one, so it is unrealistic and can only be written in table A.
At present, I don't know if the data of table B is summarized in table A and inserted into table C, someone can give me some ideas on how to write it?
边栏推荐
猜你喜欢
随机推荐
版本号命名规则
字符串提取 中文、英文、数字
uniapp time component encapsulates year-month-day-hour-minute-second
openSource 知:社区贡献
彩绘漂亮MM集
真正爱你的女人是这样的
SQL SERVER关于主从表触发器设计
二叉树进阶复习1
693. 行程排序
唤醒手腕 - 微信小程序、QQ小程序、抖音小程序学习笔记(更新中)
Access Denied: "microsoft.web.ui.webcontrols" workaround
基于 Docker 快速使用远程(云)数据库
监听浏览器刷新操作
Invalid operator for data type.The operator is add and the type is text.
RedisTemplate: 报错template not initialized; call afterPropertiesSet() before using it
Codeforce 8.1-8.7做题记录
餐饮大单品「真香」,却没有穿透周期的能力
Modeling of the MAYA ship
400 times performance improvement 丨 swap valuation optimization case calculation
Tencent Business Security Post IDP Talk Summary









