当前位置:网站首页>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?
边栏推荐
猜你喜欢
随机推荐
数据库——概述
TRACE32——加载符号表信息用于调试
DeFi 前景展望:概览主流 DeFi 协议二季度进展
常用的遍历map的方法
P1160 队列安排
Hash these knowledge you should also know
400 times performance improvement 丨 swap valuation optimization case calculation
"Automatic Data Collection Based on R Language"--Chapter 3 XML and JSON
游戏模拟器成了外挂帮凶,灰产对抗再升级
二叉树进阶复习1
Green Apple Forum reopens
Redis缓存以及存在的问题--缓存穿透、缓存雪崩、缓存击穿及解决方法
链表专项之环形链表
cmake 学习使用笔记(三)
导出SQLServer数据到Excel中
3555. 二叉树
MobileNetV1架构解析
browserslist 选项的目的是什么?
C-Eighty seven(背包+bitset)
TRACE32——Break