Back to INTRODUCTION TO SQL & DATABASES

BASIC SELECT

Understand basic `SELECT` and `SELECT *`

1 minutesVideo LessonPDF notes
🎯 Free Guest Mode: You are learning for free. Sign in to save your completion progress and quiz answers.

Ready to continue?

Mark this lesson as complete when you're ready to proceed.

Key moments

  1. What is SQL SELECT? — SELECT is the fundamental tool for picking data out of a database.
  2. How to use SQL SELECT — The SELECT statement is used to grab data from a database.
  3. Selecting Specific Columns — A simple query requests specific columns like CustomerName and City from the Customers table.
  4. SQL SELECT Syntax — The general syntax defines the columns to select and the source table name.
  5. Example Execution — Running the query successfully retrieves the requested CustomerName and City columns.
  6. SELECT ALL Wildcard — The asterisk wildcard is used to retrieve all columns in the table.
  7. Basics Summary — This covers the fundamental structure of the SQL SELECT statement.
PDF notes

Frequently asked questions

What is the purpose of the semicolon at the end of the query?

The semicolon (;) is the standard SQL statement terminator, signaling to the database engine that the command is complete and ready to execute. It is essential when running multiple statements.

Why is using SELECT * sometimes discouraged?

It retrieves potentially unnecessary data, increasing network traffic and processing load, which can negatively impact performance, especially in large production systems.

Does the order of the columns in the SELECT statement matter?

Yes, the columns will appear in the result set exactly in the order you list them in the SELECT clause, regardless of their order in the table definition.

How was this lesson?

Your feedback helps us refine explanations and catch bugs.