SA0259 : The created object already exists

The topic describes the SA0259 analysis rule.

Message

The created object already exists

Description

The rule checks T-SQL code for CREATE statements of databases, schemas, procedures, views, functions, triggers, tables and indexes, and reports in case the created objects already exist.

NOTE: The rule ignores CREATE OR ALTER statements.

Scope

The rule has a Batch scope and is applied only on the SQL script.

Parameters

Rule has no parameters.

Remarks

The rule requires SQL Connection. If there is no connection provided, the rule will be skipped during analysis.

Categories

Design Rules, Bugs

Additional Information

There is no additional info for this rule.

Example Test Script
SQL
1CREATE TABLE [Person].[Person]
2(
3        Column1 [int] NOT NULL
4)

Analysis Results

  Message Line Column
1 SA0259 : The created table already exists. 1 22
See Also

Other Resources