SQL LESSON 2 OF 32

SELECT just what you need

SELECT chooses columns; FROM chooses the table. List only the columns you need. A semicolon ends a statement. SQL keywords are case-insensitive, but use consistent formatting.

हिन्दी में समझें

SELECT कॉलम और FROM टेबल चुनता है। केवल जरूरी कॉलम लें। सेमीकोलन कथन समाप्त करता है। कीवर्ड बड़े या छोटे अक्षरों में हो सकते हैं।

अभ्यास: products से name और price इसी क्रम में चुनें।

Hinglish mein samjhein

SELECT columns aur FROM table chunta hai. Sirf zaroori columns lo. Semicolon statement end karta hai. Keywords case-insensitive hote hain.

Practice: products se name aur price isi order mein lo.

A small SQL example

SELECT name FROM customers;

Examples use the fictional shop database bundled with the SQL playground: customers, products, orders, order_items and employees. The engine is SQLite; other SQL dialects may differ.

Try this example in the SQL playground →

Practise this idea

Select name and price from products, in that column order.

Check answer & explanation
SELECT name, price FROM products;

The SELECT list controls both the chosen fields and their output order. name, price returns those two columns in that order.

Stuck in the course? Choose Check answer for either the challenge or quiz. Read the explanation and continue to the next lesson at your own pace.

Check your understanding

Which keyword selects the table?

  1. WHERE
  2. FROM
  3. ORDER BY
Check the quiz answer

FROM

SELECT chooses columns; FROM chooses the table. List only the columns you need. A semicolon ends a statement. SQL keywords are case-insensitive, but use consistent formatting.

References & corrections

Use the official SQLite documentation for full language rules. Read how these lessons are made and checked. Found a mistake? Report it to Excel Keys with this lesson URL and a reproducible example.

FROM LEARNING TO BUSINESS RESULTS

Need a dashboard for your team?

Excel Keys designs custom Excel and HTML dashboards around your own KPIs and Excel files. They run offline in the browser, so your data stays on your computer.