Database concepts
Part of the Fundamentals section of Coddy's SQL journey — lesson 3 of 72.
In databases, rows are called records, and columns are called fields.
Tables have a fixed number of fields (columns) but can contain many records (rows). Each field has a unique name, usually in lowercase and singular form. Tables typically include an id field, which serves as a unique identifier for each record, helping to distinguish between similar entries.
In SQL, we can use the asterisk * symbol as a shortcut to select all columns from a table. Instead of listing each column name, simply write:
SELECT * FROM table_nameThis query fetches every column in the specified table.
Challenge
EasyAvailable tables and columns:
<strong>objects</strong>:<strong>id</strong>,<strong>pieces</strong>,<strong>shape</strong>
Write an SQL query to retrieve all data from the objects table.
Cheat sheet
In databases, rows are called records and columns are called fields.
Use the asterisk * symbol to select all columns from a table:
SELECT * FROM table_nameTry it yourself
This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Fundamentals
4More Keywords
The IN keywordThe BETWEEN keywordThe LIKE keywordThe AS keywordRecap - Cellphone Models2Conditions
Conditions BasicsThe AND keywordThe OR keywordThe NOT keywordMultiple Conditions CombinedParenthesisBooleans5Arithmetic Operations
Mathematical OperatorsMathematical ColumnsThe Modulo OperationThe ROUND() Function3Specific Return Format
Null valuesSort Results Part 1Sort Results Part 2Recap - Cyber Security FirmLimit number of recordsRecap - Vehicle Factory6Intro Challenges
Recap - Parliamentary ElectionRecap - Police Criminal ArrestRecap - Bar Beverage ContainerRecap - Engineer new columns