GCGrowCarrer

Values and Data Types

Available

Lesson 1 of 25 · Syntax · Easy

Mastery0% of 85%
1

The big idea

SQL is the language used to ask databases for information. Every value in SQL has a type, such as a whole number, a decimal, or text.

Think of it like this: Think of `SELECT` in SQL like asking a helpful librarian a question: `SELECT 5;` simply says, 'Please hand me back the number 5.'
Key words (tap to learn):
2

Read the lesson

SQL is the language used to ask databases for information. Every value in SQL has a type, such as a whole number, a decimal, or text.

The simplest SQL statement uses SELECT followed by a value and a semicolon ;:

SELECT 20;        -- a whole number
SELECT 9.99;      -- a decimal number
SELECT 'Maya';    -- text (wrapped in single quotes)

You do not need a table yet to practice SELECT — just ask SQL for a single value and press Run to see it come back.

3

Quick check

Which keyword starts almost every basic SQL question?

4

Your challenge

1 sample test, 1 hidden

Write a simple SQL line that asks the database for the number 5 (just type SELECT 5;).

Stuck? Get a hint (free)
More learning tools(compare languages, visual guide, related lessons)

Compare with another language

Similar to python.variables-types (85% overlap). Variables & primitive types: compare let/const (JS), auto/int (C++), := (Go), let mut (Rust), and column types (SQL).

Visual walkthrough

A diagram, a step-by-step animation, and short captions for Values and Data Types.

Mastery0%

Learn this first

Nothing needed - you can start here.