Wednesday, February 9, 2011

CREATE TRIGGER AND ALTER TRIGGER MUST BE THE FIRST STATEMENT IN A QUERY BATCH.

CREATE TRIGGER AND ALTER TRIGGER MUST BE THE FIRST STATEMENT IN A QUERY BATCH. EVEN A 'USE' DATABASE command is not allowed. SO THE FOLLOWINNG :

USE GPS_Live
ALTER TRIGGER [dbo].[Trigger_gt06_1]
ON [dbo].[gt06]
AFTER INSERT

GIVES Following ERROR :
'ALTER TRIGGER' must be the first statement in a query batch.

The error is given for create trigger also

No comments:

Post a Comment