Export (0) Print
Expand All
ABS
ALL
AND
ANY
AVG
bit
COS
COT
DAY
EXP
GO
IN
LEN
LOG
MAX
MIN
NOT
OR
PI
SET
SIN
STR
SUM
TAN
USE
VAR
Expand Minimize

APP_NAME

SQL Server 2000

Returns the application name for the current session if set by the application.

Syntax

APP_NAME ( )

Return Types

nvarchar(128)

Examples

This example checks whether the client application that initiated this process is a SQL Query Analyzer session.

DECLARE @CurrentApp varchar(35)
SET @CurrentApp = APP_NAME()
IF @CurrentApp <> 'MS SQL Query Analyzer'
PRINT 'This process was not started by a SQL Query Analyzer query session.'

See Also

System Functions

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft