Click or drag to resize

Delimit/Undelimit Identifiers

Refactor commands for delimiting not delimited identifiers with square brackets and undelimiting all not delimited identifiers in the document or current selection.

Delimit identifiers command usage

The command ensures that all SQL statements have the semicolon statement terminator at the end.

Input sql script:

SQL
1CREATE TABLE Employee
2(
3EmployeeID int IDENTITY (1,1) NOT NULL,
4FirstName varchar(30),
5LastName varchar(30)
6)

Result:

SQL
1CREATE TABLE [Employee]
2(
3[EmployeeID] int IDENTITY (1,1) NOT NULL,
4[FirstName] varchar(30),
5[LastName] varchar(30)
6)
Undelimit identifiers command usage

The command removes delimiters of the identifiers that are comply with the rules for the format of regular identifiers.

Input sql script:

SQL
1SET QUOTED_IDENTIFIER ON
2go
3CREATE TABLE [Employee]]]
4(
5[EmployeeID] int IDENTITY (1,1) NOT NULL,
6[First Name] varchar(30),
7[LastName] varchar(30),
8"DeptID"   int
9)

Result:

SQL
1SET QUOTED_IDENTIFIER ON
2go
3CREATE TABLE [Employee]]]
4(
5EmployeeID int IDENTITY (1,1) NOT NULL,
6[First Name] varchar(30),
7LastName varchar(30),
8"DeptID"   int
9)
See Also

Other Resources