Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Your first table
Text data types
Summary

Instruction

Success! But wait! We told you that char(10) must get exactly 10 characters, and yet you succeeded in entering a shorter value. Did we lie to you?

Not exactly. Various databases may behave differently, but in most of them the information will still contain 10 characters. What do databases do with the remaining characters we didn't use? Some of them will fill the missing characters with spaces, others with empty characters. This is not the best option, so our advice is to always insert as many characters as required.

Exercise

Peter also wants to check what happens if the nickname is longer than 10 characters. Let's find out: Add a new user with the first name Mark and the nickname datemeifyoulikeme.