Share via


Item Templates for SQL Server Projects

You can easily add items that are common to SQL Server projects using the Add New Item command. When you use this command, the Add New Item Dialog Box appears with a list of item templates specific to SQL Server projects.

Note

The common language runtime (CLR) integration feature is turned off by default in Microsoft SQL Server and must be enabled in order to use SQL Server project items. To enable CLR integration, use the clr enabled option of the sp_configure stored procedure. For more information, see Enabling CLR Integration.

The following table shows an alphabetical list of templates available for database objects in the Add New Item dialog box when a SQL Server project is open.

Template

Description

Stored Procedure

Adds an empty stored procedure to a SQL Server project. For more information, see How to: Create and Run a CLR SQL Server Stored Procedure.

User-Defined Function

Adds an empty scalar-value, user-defined function to a SQL Server project. For more information, see How to: Create and Run a CLR SQL Server User-Defined Function.

User-Defined Type

Adds an empty user-defined type to a SQL Server project. For more information, see How to: Create and Run a CLR SQL Server User-Defined Type.

Trigger

Adds an empty trigger to a SQL Server project. For more information, see How to: Create and Run a CLR SQL Server Trigger.

Aggregate

Adds an empty aggregate function to a SQL Server project. For more information, see How to: Create and Run a CLR SQL Server Aggregate.

Class

Adds an empty class declaration.

Module File

Adds an empty module file.

See Also

Tasks

How to: Create a SQL Server Project

Walkthrough: Creating a Stored Procedure in Managed Code

How to: Debug a SQL CLR Stored Procedure

Concepts

Introduction to SQL Server CLR Integration (ADO.NET)

Advantages of Using Managed Code to Create Database Objects

Item Templates for SQL Server Projects

Reference

Attributes for SQL Server Projects and Database Objects

Other Resources

SQL CLR Database Debugging