FILEGROUP_ID
catalog lookup
What changes
- Input
- catalog metadata (object, column, index, file, database properties)
- Output or change
- id, name or property value
- Return type
- int
Syntax at a glance
FILEGROUP_ID ( 'filegroup_name' )
Work example
Resolve a filegroup name to its database-local identifier.
Use schema-qualified names and test missing and permission-hidden objects separately.
Check your work Use the id only inside the database that owns the filegroup.
Open Microsoft Learn for full syntax, permissions, and details for your version.