User Documentation
Ispirer Capabilities - Microsoft SQL Server Migration
Pricing
SQL Server - System Functions
This article describes the Transact-SQL system functions supported by Microsoft SQL Server.
Overview
| Function | Description |
| |
| APP_NAME() | Returns the application name for the current session |
| OBJECT_NAME() | Returns the database object name |
| @@PROCID | Returns the object identifier (ID) of the current Transact-SQL module |
APP_NAME
| SQL Server - APP_NAME |
| Syntax | APP_NAME() |
| Description | Returns the application name for the current session if set by the application |
| Return Type | NVARCHAR(128) |
Equivalents in Other Databases
OBJECT_NAME
| SQL Server - OBJECT_NAME |
| Syntax | OBJECT_NAME(object_id) |
| Parameter | ID of the object. object_id is INT |
| Description | Returns the database object name for the specified object ID |
| Return Type | sysname |
@@PROCID
| SQL Server - @@PROCID |
| Syntax | @@PROCID |
| Description | Returns the object identifier (ID) of the current Transact-SQL module. A Transact-SQL module can be a stored procedure, user-defined function, or trigger. |
| Remarks | @@PROCID cannot be specified in CLR modules or the in-process data access provider. |
| Return Type | int |