Retrieving Specific Columns of Information

SQL: SELECT: Basics

Separate column names with commas:

// Retrieving a single column:

SELECT <column name> FROM <table name>;

// Retrieving multiple columns:

SELECT <column name 1>, <column name 2>, ... FROM <table name>;

Example:

//Retrieving a single column:

SELECT email FROM users;
SELECT first_name FROM users;
SELECT name FROM products;
SELECT zip_code FROM addresses;

//Retrieving multiple columns:

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;

Source: https://github.com/treehouse/cheatsheets/blob/master/sql_basics/cheatsheet.md