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.

SCOPE_IDENTITY<br />

The SCOPE_IDENTITY function returns the last value inserted into an identity column in the same scope<br />

(that is, within the same sproc, trigger, function, or batch). This is similar to IDENT_CURRENT, discussed<br />

earlier, although that was not limited to identity insertions made in the same scope.<br />

This function returns a sql_variant data type, and the syntax is as follows:<br />

SCOPE_IDENTITY()<br />

SERVERPROPERTY<br />

The SERVERPROPERTY function returns information about the server you are running on. The syntax is<br />

as follows:<br />

SERVERPROPERTY(‘’)<br />

The possible values for propertyname are:<br />

Property Name Values Returned<br />

Collation The name of the default collation for the server.<br />

Edition The edition of the <strong>SQL</strong> <strong>Server</strong> instance installed on the server. Returns one of<br />

the following nvarchar results:<br />

‘Desktop Engine’<br />

‘Developer Edition’<br />

‘Enterprise Edition’<br />

‘Enterprise Evaluation Edition’<br />

‘Personal Edition’<br />

‘Standard Edition’<br />

Engine<br />

tEdition<br />

The engine edition of the <strong>SQL</strong> <strong>Server</strong> instance installed on the server:<br />

1 — Personal or Desktop Engine<br />

2 — Standard<br />

3 — Enterprise (returned for Enterprise, Enterprise Evaluation, and Developer)<br />

InstanceName The name of the instance to which the user is connected.<br />

IsClustered Will determine if the server instance is configured in a failover cluster:<br />

1 — Clustered<br />

0 — Not clustered<br />

NULL — Invalid input or error<br />

IsFullText<br />

Installed<br />

Apendix A: System Functions<br />

To determine if the full-text component is installed with the current instance<br />

of <strong>SQL</strong> <strong>Server</strong>:<br />

1 — Full-text is installed.<br />

0 — Full-text is not installed.<br />

NULL — Invalid input or error<br />

Continued<br />

645

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

Saved successfully!

Ooh no, something went wrong!