FILEGROUPPROPERTY (T-SQL)

Returns the specified filegroup property value when given a filegroup and property name.

Syntax

FILEGROUPPROPERTY(filegroup_name, property)

Arguments
filegroup_name
Is an expression containing the name of the filegroup for which to return the named property information. filegroup_name is nvarchar(128).
property
Is an expression containing the name of the filegroup property to return. property is varchar(128), and can be one of these values.

 

Value Description Value returned
IsReadOnly Filegroup name is read-only. 1 = True
0 = False
NULL = Invalid input
IsUserDefinedFG Filegroup name is a user-defined filegroup. 1 = True
0 = False
NULL = Invalid input
IsDefault Filegroup name is the default filegroup. 1 = True
0 = False
NULL = Invalid input

Return Types

int

Examples

This example returns the setting for the IsUserDefinedFG property for the primary filegroup.

USE master

SELECT FILEGROUPPROPERTY('primary', 'IsUserDefinedFG')

  

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

  


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