Saturday, 9 April 2016

Different Characters and Their Numbers in SQL SERVER

There are Different symbols in SQL Server useful while writing the Dynamic SQL Query.

The total list in SQL 2012 are 255.
You get to know the all Symbols while running below Query.

;WITH X AS(
SELECT 0 CharNumber, CAST ('' AS VARCHAR) Symbol
UNION ALL
SELECT X.CharNumber+1, CAST(CHAR(X.CharNumber+1) AS VARCHAR) FROM X WHERE X.CharNumber<=255
)SELECT * FROM X OPTION (MAXRECURSION 1000)

Few Symbols showing below.

No comments:

Post a Comment

EMP, DEPT Sample script

/****** Object:  Table [dbo].[DEPT]    Script Date: 19-05-2016 06:58:37 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET A...