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 />

TYPEPROPERTY<br />

The TYPEPROPERTY function returns information about a data type. The syntax is as follows:<br />

TYPEPROPERTY(, )<br />

The type parameter specifies the name of the data type. The property parameter specifies the property<br />

of the data type that is to be queried; it can be one of the following values:<br />

❑ Precision — Returns the number of digits/characters.<br />

❑ Scale — Returns the number of decimal places.<br />

❑ AllowsNull — Returns 1 for True and 0 for False.<br />

❑ UsesAnsiTrim — Returns 1 for True and 0 for False.<br />

Rowset Functions<br />

The rowset functions return an object that can be used in place of a table reference in a T-<strong>SQL</strong> statement.<br />

The rowset functions are:<br />

❑ CHANGETABLE<br />

❑ CONTAINSTABLE<br />

❑ FREETEXTTABLE<br />

❑ OPENDATASOURCE<br />

❑ OPENQUERY<br />

❑ OPENROWSET<br />

❑ OPENXML<br />

CHANGETABLE<br />

Returns change tracking information for a table.You can use this statement to return all changes for a<br />

table or change tracking information for a specific row. The syntax is as follows:<br />

CHANGETABLE (<br />

{ CHANGES table , last_sync_version<br />

| VERSION table , } )<br />

[AS] table_alias [ ( column_alias [ ,...n ] )<br />

CONTAINSTABLE<br />

628<br />

The CONTAINSTABLE function is used in full-text queries. Please refer to Chapter 21 for an example of its<br />

usage. The syntax is as follows:<br />

CONTAINSTABLE (, { | *}, ‘’)

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

Saved successfully!

Ooh no, something went wrong!