I'd like to create a trigger on a SQL Server 2000 table that operates if the table is in a particular database, but not in others. How do I query for the database name?
Thanks.
DB_NAME() will give you the database name but since you create a trigger on tables I don't see how this is usefull?
when you create a trigger on table abc you have to be in a DB already so you already know the name on creation
Denis the SQL Menace
http://sqlservercode.blogspot.com/
No comments:
Post a Comment