Click or drag to resize

SA0125 : Avoid use of the SELECT INTO syntax

The topic describes the SA0125 analysis rule.

Message

Avoid use of the SELECT INTO syntax

Description

The rule checks for SELECT INTO statement being used.

Consider replacing the SELECT INTO statement with explicit table creation and then use the INSERT INTO statement.

Scope

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

Parameters
NameDescriptionDefault Value
RuleSuppressMark

Suppress rule reporting a rule violation in case a comment containing the value of this parameter is found close to the source of violation.

IGNORE:SA0125

Remarks

The rule does not need Analysis Context or SQL Connection.

Categories

Design Rules

Additional Information
Example Test Script
1SELECT * INTO Table2 FROM Table1
2
3SELECT * INTO Table2 /*IGNORE:SA0125*/ FROM Table1 
4
5SELECT * INTO /*IGNORE:SA0125*/ Table2  FROM Table1

Analysis Results

 MessageLineColumn
1SA0125 : Avoid use of the SELECT INTO syntax.19
See Also

Other Resources