Back to articles
SELECT Query
How-ToSystems

SELECT Query

via Dev.to BeginnersMohammed Azim J

I was learning SQL SELECT queries using the dvdrental database, and I realized that SELECT is probably the most used SQL command because every time we want to see data from a database, we use SELECT. The most basic query I tried was to just see customer names from the customer table. SELECT first_name FROM customer; I used this to just view the first names and check if the table had data. Then I wanted more details about customers, so instead of only first name, I selected multiple columns. SELECT first_name, last_name, email FROM customer; I used this because usually when viewing customers, name and email are more useful together rather than just first name alone. After that, I wanted to see the entire table to understand all the columns available. SELECT * FROM customer; I used this only to explore the table and understand the structure, not for regular use. Then I tried filtering data to see only customers from a specific store. SELECT first_name, last_name FROM customer WHERE store

Continue reading on Dev.to Beginners

Opens in a new tab

Read Full Article
6 views

Related Articles