1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[SQL] Send message to trigger

Discussão em 'Outras Linguagens' iniciado por Stack, Outubro 18, 2024 às 01:43.

  1. Stack

    Stack Membro Participativo

    Is it possible to send a message that can be used in trigger code?

    Something like

    CREATE TRIGGER MyTrigger ON MyTable
    AFTER INSERT
    AS BEGIN
    INSERT INTO AnotherTable (Col, TheMessage)
    SELECT Col, TRIGGER_MESSAGE FROM inserted -- TRIGGER_MESSAGE contains 'Hey, its me'
    END

    INSERT INTO MyTable (Col) VALUES (1) TRIGGER_MESSAGE 'Hey, its me'

    Continue reading...

Compartilhe esta Página