Udostępnij za pośrednictwem


How to: Specify Object-level SET Options

For each database project, you can specify values for seven SET options. Two of those options, ANSI nulls and Quoted Identifiers, also appear as properties for each database object. You use these properties to specify different values for each object than you specified for the project. By default, database objects inherit values for these options from the database project. The build script contains SET statements for a database object only if the value of the option for that object differs from the value of the option for the database project.

To specify SET options for a database object

  1. In Solution Explorer, right-click the object for which you want to specify a SET option, and click Properties.

  2. If necessary, expand the Database Option node.

  3. To set the value of the ANSI nulls property, do one of the following:

    • Click Project Default to set the value of this property to match the value of the option for the database project.

    • Click On if you want all comparisons to a null value to evaluate to UNKNOWN.

    • Click Off if you want all comparisons of non-UNICODE values to a null value to evaluate to True if both values are NULL.

  4. To set the value of the Quoted identifier property, do one of the following:

    • Click Project Default to set the value of this property to match the value of the option for the database project.

    • Click On if you want SQL Server keywords to be used as identifiers (an object or variable name) if enclosed in quotation marks.

    • Click Off if you want do not want SQL Server keywords to be used as identifiers (an object or variable name) if enclosed in quotation marks.

  5. On the File menu, click Save All.

    When you build and deploy the database project, SET statements are generated in the build script for any object for whom the values of the SET options differ from those of the database project.

See Also

Tasks

How to: Prepare Database Build Scripts

Concepts

Scenario: Create and Modify Database and Server Objects

Terminology Overview of Database Edition