FILE_ID
catalog lookup
What changes
- Input
- catalog metadata (object, column, index, file, database properties)
- Output or change
- id, name or property value
- Return type
- smallint
Syntax at a glance
FILE_ID ( file_name )
Work example
Resolve a logical database file name to its file id.
Use schema-qualified names and test missing and permission-hidden objects separately.
Check your work Keep logical names distinct from operating-system paths and use the right database context.
Open Microsoft Learn for full syntax, permissions, and details for your version.