T-SQL Tutorial

Char - TSQL Tutorial


On Transact SQL language the char is part of character strings data types and have fixed length.
The string length must be a value from 1 through 8,000.

Char syntax:

char [ ( n ) ]

Char example:

USE model;
GO
CREATE TABLE myCharTable ( a char(25) );
GO
INSERT INTO myCharTable VALUES ('abc + def');
GO
SELECT a FROM myCharTable;
GO

Results
abc + def