Notitie
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen u aan te melden of de directory te wijzigen.
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen de mappen te wijzigen.
Applies to: 
 SQL Server  
 Azure SQL Database 
 Azure SQL Managed Instance
Returns the type or types of data manipulation language (DML) triggers defined on the specified table for the current database. sp_helptrigger can't be used with data definition language (DDL) triggers. Query the sys.triggers catalog view instead.
 Transact-SQL syntax conventions
Syntax
sp_helptrigger
    [ @tabname = ] N'tabname'
    [ , [ @triggertype = ] 'triggertype' ]
[ ; ]
Arguments
[ @tabname = ] N'tabname'
The name of the table in the current database for which to return trigger information. @tabname is nvarchar(776), with no default.
[ @triggertype = ] 'triggertype'
The type of DML trigger to return information about. @triggertype is char(6), and can be one of these values.
| Value | Description | 
|---|---|
| DELETE | Returns DELETEtrigger information. | 
| INSERT | Returns INSERTtrigger information. | 
| UPDATE | Returns UPDATEtrigger information. | 
Return code values
0 (success) or 1 (failure).
Result set
The following table shows the information that is contained in the result set.
| Column name | Data type | Description | 
|---|---|---|
| trigger_name | sysname | Name of the trigger. | 
| trigger_owner | sysname | Name of the owner of the table on which the trigger is defined. | 
| isupdate | int | 1=UPDATEtrigger0= Not anUPDATEtrigger | 
| isdelete | int | 1=DELETEtrigger0= Not aDELETEtrigger | 
| isinsert | int | 1=INSERTtrigger0= Not anINSERTtrigger | 
| isafter | int | 1=AFTERtrigger0= Not anAFTERtrigger | 
| isinsteadof | int | 1=INSTEAD OFtrigger0= Not anINSTEAD OFtrigger | 
| trigger_schema | sysname | Name of the schema to which the trigger belongs. | 
Permissions
Requires Metadata Visibility Configuration permission on the table.
Examples
The following example executes sp_helptrigger to produce information about the triggers on the Person.Person table in the AdventureWorks2022 database.
USE AdventureWorks2022;
GO
EXECUTE sp_helptrigger 'Person.Person';