Introduction-to-SQL For 5 Year Olds
Introduction-to-SQL For 5 Year Olds
by Iqbal wali
Data Definition Language (DDL)
Data Definition Language (DDL) is a subset of SQL used for defining the structure of a database. It is used to create,
modify, and delete database objects like tables, views, indexes, and users. Essentially, DDL is how you tell the database
what your data looks like and how it should be organized.
The CREATE statement is used to The ALTER statement is used to The DROP statement is used to
define new database objects, such modify the structure of existing remove existing database objects,
as tables, views, and indexes. database objects, such as adding or such as tables or views.
removing columns.
Data Types
1 Numeric 2 Text
Integers, floating-point Character strings of
numbers, and decimal varying lengths, such as
values for storing names, descriptions, and
numerical data. addresses.
2 INSERT
Adds new records to a table, specifying the values for each column.
3 UPDATE
Modifies existing records in a table, updating one or more columns.
4 DELETE
Removes existing records from a table based on specified criteria.
SELECT Statement
Projection Filtering Aggregation
The SELECT clause specifies the The WHERE clause filters the rows The GROUP BY clause groups the
columns to be included in the result based on specified conditions. results by one or more columns.
set.
INSERT, UPDATE,
DELETE Statements
INSERT
Adds new records to a table, specifying the values for
each column.
UPDATE
Modifies existing records in a table, updating one or
more columns.
DELETE
Removes existing records from a table based on
specified criteria.
Conclusion and Key Takeaways