触发和存储过程(更新或修改数据) [英] Trigger and Store Procedure (Update or Modify Data)
本文介绍了触发和存储过程(更新或修改数据)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有人,
我想将数据放入数据库中.
在将数据插入数据库期间,表将被更新或修改
成功.
我如何完成这项工作?
所以请尽快帮我...
例1:如果id相同,则只需增加商品编号即可.
例2:如果编辑现有数据并将此数据插入数据库,则
触发器或过程只需将数据更新到数据库中即可.
最好的问候,
Md.Shawon Mahmud
Dear all,
I want to put a data into the database.
During insert data into the database then table will be update or modify
successfully.
How to i have done this work?
So please help me soon.. ..
Ex1: if id is same then procedure just increase the item number.
Ex2: If edit the existing data and insert this data in database then
trigger or procedure just update the data into the database.
best regards,
Md.Shawon Mahmud
推荐答案
好吧,我们可以考虑以下两种情况来做到这一点:
1.使用简单的触发器.
2.使用SQL表达式作为公式
尝试以下链接:
链接1: SQL Server数据库触发器概述 [ SQL CASE表达式的简单使用 [
Well we can do this by considering with two scenarios:
1. Using a simple Trigger.
2. Using SQL expression as a formula
Try the following Links:
Link 1:Overview of SQL Server database Triggers[^]
Link 2:A Simple Use of SQL CASE Expression[^]
这篇关于触发和存储过程(更新或修改数据)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文