Syntax of FILE_NAME Function :
FILE_NAME ( file_id )
file_id is an identification number. It corresponds to the fileid column in sysfiles. It is of type smallint.
Return type of FILE_NAME function is nvarchar(128).
Examples of FILE_NAME Function :
Example 1 : Use of FILE_NAME function in select clause
SELECT FILE_NAME(2)
Output
Northwind_log
Above example returns name of file having id 2 in sysfiles.