17.06.2013 Views

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix A: System Functions<br />

FILEGROUP_ID<br />

The FILEGROUP_ID function returns the filegroup ID number for the specified filegroup name. The syntax<br />

is as follows:<br />

FILEGROUP_ID(‘’)<br />

The filegroup_name parameter specifies the filegroup name of the required filegroup ID.<br />

FILEGROUP_NAME<br />

The FILEGROUP_NAME function returns the filegroup name for the specified filegroup ID number. The<br />

syntax is as follows:<br />

FILEGROUP_NAME()<br />

The filegroup_id parameter specifies the filegroup ID of the required filegroup name.<br />

FILEGROUPPROPERTY<br />

The FILEGROUPPROPERTY returns the setting of a specified filegroup property, given the filegroup and<br />

property name. The syntax is as follows:<br />

FILEGROUPPROPERTY(, )<br />

The filegroup_name parameter specifies the name of the filegroup that contains the property being<br />

queried. The property parameter specifies the property being queried and can be one of the following<br />

values:<br />

❑ IsReadOnly — The filegroup name is read-only.<br />

❑ IsUserDefinedFG — The filegroup name is a user-defined filegroup.<br />

❑ IsDefault — The filegroup name is the default filegroup.<br />

The return value from this function will be 1 for True, 0 for False, and NULL if the input was not valid.<br />

FILEPROPERTY<br />

620<br />

The FILEPROPERTY function returns the setting of a specified filename property, given the filename and<br />

property name. The syntax is as follows:<br />

FILEPROPERTY(, )<br />

The file_name parameter specifies the name of the filegroup that contains the property being queried.<br />

The property parameter specifies the property being queried and can be one of the following values:<br />

❑ IsReadOnly — The file is read-only.<br />

❑ IsPrimaryFile — The file is the primary file.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!