I am setting variables to a select statement. It is working, but I hear this is a bad practice. Can someone tell me if what the trigger is doing is a good practice.

set ANSI_NULLS ON
set QUOTED_IDENTIFI ER ON
go



ALTER TRIGGER [Dpc_Add_Zone_OC _History] ON [dbo].[zone]
FOR INSERT, UPDATE
AS
Declare @icnt int
,@dcnt int
,@tran_type char(1)
,@ZoneID...