Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Text information
Boolean
Date and time
Summary

Instruction

Alright, success! 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? Well, not exactly. Various databases may behave differently, but in most of them the information will still take 10 characters. What will databases do with the remaining characters we didn't use? Some of them will complete the missing characters with spaces, others with empty characters, for instance. This is not the best option, so our advice is to always insert as many characters as we should.

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 first name Mark and nickname datemeifyoulikeme.

Stuck? Here's a hint!

Type

INSERT INTO user_account VALUES ('Mark', 'datemeifyoulikeme');