FILE_NAME (T-SQL)

Returns the logical file name for the given file identification number (ID).

Syntax

FILE_NAME(file_id)

Arguments
file_id
Is the file identification number for which to return the file name. file_id is smallint.
Return Types

nvarchar(128)

Remarks

file_ID corresponds to the fileid column in sysfiles.

Examples

This example returns the file name for a file_ID of 1 (the master database file).

USE master

SELECT FILE_NAME(1)

  

See Also
Control-of-Flow Language UPDATE
DELETE WHERE
INSERT Metadata Functions
SELECT  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.