Trigger Question

Results 1 to 2 of 2

Thread: Trigger Question

  1. #1
    Join Date
    Dec 1969

    Default Trigger Question

    I am a writing a trigger..<BR><BR>Declare @Species nvarchar(100)<BR>Declare @protocol nvarchar(100)<BR><BR>Set @Species = (Select Species from inserted)<BR>Set @protocol = (Select protocol from inserted)<BR><BR>The above works fine, but I was wondering if it is possible to combine the two select statements and assign the variables to its values. <BR><BR>I am very new to SQL server, so be kind to me :)<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Trigger Question

    SELECT @Species = i.Species,@Protocol = i.Protocol FROM inserted i<BR><BR>However always be carefull to use triggers, they are an real hit on the server.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts