From the course: Database Foundations: Data Structures

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Character data types

Character data types

From the course: Database Foundations: Data Structures

Start my 1-month free trial

Character data types

- [Instructor] From employee names to product descriptions, much of the data that you'll want to store is text-based. In database terminology, these are called character strings. When working with character data, we're mainly concerned with the number of individual characters that we need in order to store each value. This is like counting up the number of letter tiles in your hand while playing a crossword board game. In order to play longer words, you'll need more tiles. To play a shorter word, you'll need fewer tiles. To store text in the database, the SQL standard defines two main data types, fixed length and variable length, and each of these are configurable to meet your needs. Char is a fixed length data type that'll store exactly the number of characters that you specify by replacing the letter N with your number in the parentheses. If the number of characters in the string is less than the number allowed, then the…

Contents