SQL - Char(N) datatype

> (Data|State) Management and Processing > (Data Type|Data Structure) > (Relation|Table) - Tabular data > Structured Query Language (SQL)

Table of Contents

1 - About

Char(N) is a sql datatype that means that the column shall be able to hold any string of characters of a fixed length of N.

If the string that a column of datatype char(N) holds is shorter than N characters, then trailing spaces shall be stored in the database or the database shall automatically pad with spaces upon retrieval such that a CHAR_LENGTH() function will return N.

See also: SQL - VARCHAR(N) datatype

Advertising