FILEGROUP_ID (T-SQL)

Returns the filegroup identification number (ID) for the given filegroup name.

Syntax

FILEGROUP_ID('filegroup_name')

Arguments
'filegroup_name'
Is the filegroup name for which to return the filegroup ID. filegroup_name is nvarchar(128).
Return Types

smallint

Remarks

filegroup_name corresponds to the groupname column in sysfilegroups.

Examples

This example returns the filegroup ID for the filegroup named default.

USE master

SELECT FILEGROUP_ID('default')

  

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

  


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