Ispirer Ispirer
 


Ispirer Home Page Ispirer SQLWays Product Page - Migration to SQL Server Request SQLWays

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

Database Equivalent
Oracle The PROGRAM column in the V$SESSION system view, see Return Application Name in Oracle

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


Ispirer Home Page Ispirer SQLWays Product Page - Migration to SQL Server Request SQLWays

sqlways/sql-server/system-functions.txt · Last modified: May 07, 2018, 03:15:32 PM (external edit)
 
© 1999-2018, Ispirer Systems Ltd.
All Rights Reserved.  Privacy Statement