能帮我解释下sql server触发器模板里这几句的意思么?
WHERE name = N ' <trigger_name, sysname, trig_test> '
AND type = 'TR ')中N ' <trigger_name, sysname, trig_test> ' N '是什么意思? <> 里的三项都是什么?能举个例子么?
还有CREATE TRIGGER <trigger_name, sysname, trig_test>
ON <table_or_view_name, sysname, pubs.dbo.sales> 这两个 <> 里的三相都是什么意思?
IF EXISTS (SELECT name
FROM sysobjects
WHERE name = N ' <trigger_name, sysname, trig_test> '
AND type = 'TR ')
DROP TRIGGER <trigger_name, sysname, trig_test>
GO
CREATE TRIGGER <trigger_name, sysname, trig_test>
ON <table_or_view_name, sysname, pubs.dbo.sales>
INSTEAD OF INSERT
AS
BEGIN
RAISERROR (50009, 16, 10)
EXEC sp_who
END
GO
谢过了先
------解决方案--------------------sysname等价于not null 的nvarchar(128),这于它显示的leng-256是表示占用256个字节的空间.但是只能存128个字符(一个字符占两个字节).