zoukankan      html  css  js  c++  java
  • 创建触发器

    USE [DataServiceCenterDBNH]
    GO

    /****** Object: Trigger [dbo].[insertAir2019] Script Date: 01/07/2019 17:34:58 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO


    -- ================================================
    -- Template generated from Template Explorer using:
    -- Create Trigger (New Menu).SQL
    --
    -- Use the Specify Values for Template Parameters
    -- command (Ctrl-Shift-M) to fill in the parameter
    -- values below.
    --
    -- See additional Create Trigger templates for more
    -- examples of different Trigger statements.
    --
    -- This block of comments will not be included in
    -- the definition of the function.
    -- ================================================
    -- =============================================
    -- Author: <Author,符攸庆>
    -- Create date: <Create Date,2018-12-12 20:30:50>
    -- Description: <Description,空气质量数据同步南海库>
    -- =============================================
    CREATE TRIGGER [dbo].[insertAir2019]
    ON [dbo].[Air_h_2019_M14999_Src]
    AFTER insert
    AS
    BEGIN
    declare @StationCode varchar(10), @TimePoint datetime, @PollutantCode varchar(5),@MonValue decimal(10, 3);
    set @StationCode='A440605001';
    select @TimePoint=TimePoint,@PollutantCode=PollutantCode,@MonValue=MonValue from inserted

    insert into [Skyland.MSC.NH].[dbo].[Air_h_2019_A440605001_Src]([StationCode]
    ,[TimePoint]
    ,[PollutantCode]
    ,[MonValue])
    values(@StationCode,@TimePoint,@PollutantCode,@MonValue);
    END


    GO

  • 相关阅读:
    eclipse环境:把jdk1.6 改 jdk1.7或jdk1.8(改回也可以)(图文详解)
    SVN 将文件还原到之前的指定版本
    用起来很方便的枚举扩展类
    VS2015新功能
    EasyUi 动态列
    基于EasyUi的快速开发框架
    深圳某保险公司招聘职位列表
    考勤系统之计算工作小时数
    考勤系统之状态管理
    第一次裁员
  • 原文地址:https://www.cnblogs.com/luoguixin/p/10234561.html
Copyright © 2011-2022 走看看