Field sizes
Field size sets the maximum length or storage a value may use. VARCHAR(30) allows up to 30 characters; longer values are rejected or cut. Smaller sizes save storage.
Understanding Field sizes in VCE Data Analytics U3O1
What it does: VARCHAR(3) limits the field to 3 characters, enough for codes like VIC or NSW and no storage is wasted. TINYINT uses less storage than INT, so choosing it for small values like year levels saves space. The size in brackets sets the maximum length of the text. It is not the value itself. Choose a size that fits the longest expected value. A smaller size saves storage and matches the data. A value longer than the field size is rejected or cut. The field does not resize. SQL puts the size in round brackets straight after the data type, like VARCHAR(50).
Common mistakes: The field size must go in round brackets, not square brackets. It should be VARCHAR(30). The opening bracket is missing. The field definitions, including their sizes such as VARCHAR(50), must start after CREATE TABLE products (.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 17–49) and word search (Modules 17–91).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
VARCHAR(30)Fill in the Blanks
Spot the Error
Student with a class code? Join your class →