Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Create trigger

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

-- create a trigger USE [TEST] GO-- for a table There are multiple triggers, one of which is the case of INSTEAD OF. Other triggers will lose their function. CREATE trigger _ Name-- name-- ALTER modifies on COPTD-- Table name for INSERT,UPDATE,DELETE-- INSERT,UPDATE corresponds to Inserted table DELETE corresponds to deleted table-- Instead Of INSERT-- insert data into Inserted table as BEGIN DECLARE @ TD001 char (4) SELECT @ TD001 = TD001 from Inserted-- assign if exists (select UDF11 from INVMB where MB001 = @ TD001 and UDF11 ='N') BEGIN INSERT INTO COPTDLog (TD001) VALUES (@ TD001) END END-- -

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

  • Schema.xml of mycat

    1. A simple schema.xml file: 1. The contents of the file:

    © 2024 shulou.com SLNews company. All rights reserved.

    12
    Report