Loading topic
SELECT ... FROM. Here you will learn what the select list is, what * does, and why named columns are the safer choice in most real work.6 min readSELECT ... FROM query, you know what tables, rows, and columns are, and you have a SQL client connected to PostgreSQL, MySQL, or SQLite. The examples use an employees table with the columns first_name, last_name, department, salary, hire_date,5 min readSELECT ... FROM query, choose columns, and read a table as rows and columns. You should also have a SQL client connected to a database such as PostgreSQL, MySQL, or SQLite.6 min readWHERE clause filters rows. Without it, a query returns every row in the table. With it, the database returns only the rows for which a condition holds. This chapter covers how WHERE evaluates, where it sits in a query, and the mistakes that cause empty or surprising results.5 min readWHERE condition. This chapter covers what they return, how they behave across numbers, text, and dates, and the cases where they quietly return fewer rows than you expect.5 min readSELECT ... FROM ... WHERE query and that you know the comparison operators (=, <>, <, <=, >, >=). You should also know that a table has rows and columns. The examples use an employees table with the columns first_name, last_name, `depart6 min readSELECT ... FROM ... WHERE query, that you know the comparison operators (=, <>, <, <=, >, >=), and that you can combine conditions with AND, OR, and NOT. Examples use an employees table with the columns first_name, last_name, `depa5 min readSELECT ... FROM ... WHERE query and know that text values go in single quotes. It also assumes you know that a condition in WHERE can be true, false, or unknown (the NULL logic from the previous chapter). The examples use the employees table from earlier ch4 min readSELECT ... FROM ... WHERE query and combine conditions with AND, OR, and NOT. It uses the employees table from earlier chapters. You need access to PostgreSQL, MySQL, or SQLite to run the examples.5 min readSELECT ... FROM ... WHERE query and know what tables, rows, and columns are. The examples use an employees table with the columns employee_id, first_name, last_name, department, salary, hire_date, and manager_id. They run on PostgreSQL, My6 min readSELECT ... FROM ... WHERE query and have seen a single-column ORDER BY. You should also know what a NULL is. The examples use the employees table from earlier chapters, with columns such as first_name, last_name, department, salary, `hire_date6 min readORDER BY with ASC and DESC, and that you know NULL marks a missing value that you test with IS NULL. The examples use one small table, so you can run them in PostgreSQL, MySQL, or SQLit6 min readSELECT with WHERE and ORDER BY, and that you know NULL means "no value". You need access to PostgreSQL, MySQL, or SQLite to try the examples. They use the employees table from earlier chapters.5 min readSELECT, WHERE, and ORDER BY statements, know what a column alias is, and have a table of employees to practice on. Examples run on PostgreSQL, MySQL, and SQLite unless noted.5 min read