Home › coding › sql › sql data types

Sql Data Types — Free Sql Tutorial

Learn Sql Data Types in Sql with a free, beginner-friendly tutorial, examples and practice for Indian students on Syllab.in.

✓ 100% Free ✓ No Login Needed ✓ NCERT / CBSE Aligned ✓ Download as PDF

TL;DR: Learn Sql Data Types in Sql with a free, beginner-friendly tutorial, examples and practice for Indian students on Syllab.in.

Written & reviewed by the Syllab.in Academic Team (CBSE/NCERT subject experts) · Updated Jul 14, 2026

🤖 Stuck on any question? Ask Syllab's free AI Tutor for a step-by-step explanation — instant, unlimited, no login.

Sql Data Types in Sql

SQL data types define what kind of data a column can store: numbers, text, dates, booleans. Choosing the right type ensures data integrity and optimises storage.

Numeric types: TINYINT (1 byte, 0-255), INT (4 bytes, -2B to +2B), BIGINT (8 bytes), DECIMAL(p,s) (exact decimal for money), FLOAT/DOUBLE (approximate floating-point).

Text types: CHAR(n) (fixed-length string, pads with spaces), VARCHAR(n) (variable-length, up to n chars), TEXT (unlimited). Use VARCHAR for flexibility.

Date/Time: DATE (YYYY-MM-DD), DATETIME (YYYY-MM-DD HH:MM:SS), TIME, TIMESTAMP. Use DATE for pure dates, DATETIME for date+time.

Sql Data Types — Syntax

INT, BIGINT, TINYINT
DECIMAL(10,2) -- 10 total digits, 2 after decimal
VARCHAR(100) -- up to 100 chars
DATE, DATETIME, TIMESTAMP
BOOLEAN (or TINYINT(1) in MySQL)

Learn Sql Data Types step by step with Syllab's free interactive Sql tutorial — runnable code examples, practice exercises and instant AI feedback, all free with no signup. Explore the full Sql course →

Explore:

  • Syllabus
  • Practice
  • Mock Tests
  • NCERT Solutions
  • Coding
  • GK Quiz
  • Career Predictor
  • AI Tutor
  • Live Quiz
  • Doubt Solver
  • Microlearning
  • Free Alternatives
  • Kids Zone
  • Study Room
  • Calculators
  • Worksheets

Syllab.in — Free learning for Indian students, Class 1–12