Every Beginner Must Know
students
might have columns like id
, name
, and age
.id | name | age |
---|---|---|
1 | Rahul | 20 |
2 | Priya | 22 |
INT
: Numbers without decimals (e.g., age: 25
)VARCHAR
: Text (e.g., name: "Amit"
)DATE
: Dates (e.g., 2025-01-01
)students
table:
id | name | age |
---|---|---|
1 | Rahul | 20 |
2 | Priya | 22 |
id
column is the primary key because no two students can have the same ID.
departments
table has a column called dept_id
.employees
table uses this dept_id
to say which department they belong to.SELECT
, INSERT
, and WHERE
are not case-sensitive in databases.SELECT
and select
are treated the same.employees
and Employees
are different. On Windows, they are treated the same."
).employees
is your table name in a case-sensitive database:
'Matt'
and 'matt'
may not match unless you explicitly make the comparison case-insensitive.