April 2024
Intermediate to advanced
127 pages
2h 29m
English
In this chapter, we’ll learn to select data from our database. This is a relatively large topic, so we’ll be splitting it into three chapters.
The data used for selection are from the two tables (employees and mentorships) that we created in the previous chapters. These tables can be found in Appendix A for easy reference.
In the first chapter, we’ll learn to select data from a single table.
To select data from a single table, we use the syntax
SELECT column_names_or_other_information
[AS alias]
[ORDER BY column(s)] [DESC]
FROM table_name
[WHERE condition];
Let’s look at some examples.
If we want to select all the columns and rows from a table, we ...