Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
You don't have to retrieve all the information from a table. You can retrieve only the information you want from the columns you want and filter out the rest.
SQL Used
Retrieving a single column:
SELECT <column name> FROM <table name>;
Examples:
SELECT email FROM users;
SELECT first_name FROM users;
SELECT name FROM products;
SELECT zip_code FROM addresses;
Retrieving multiple columns:
SELECT <column name 1>, <column name 2>, ... FROM <table name>;
Examples:
SELECT first_name, last_name FROM customers;
SELECT name, description, price FROM products;
SELECT title, author, isbn, year_released FROM books;
SELECT name, species, legs FROM pets;
See all of the SQL used in SQL Basics in the SQL Basics Cheat Sheet.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up