SQL Interview Flashcards
SQL Interview Flashcards
Q: What is SQL?
A: SQL (Structured Query Language) is used to communicate with databases to create, read, update, and
delete data.
A: WHERE filters rows before grouping; HAVING filters groups after GROUP BY.
A: A field in one table that refers to the Primary Key in another table.
A: JOINS combine rows from two or more tables based on a related column.
Q: What is Normalization?
A: DELETE: row by row; TRUNCATE: all rows quickly; DROP: deletes the table.
A: SELECT MAX(salary) FROM employees WHERE salary < (SELECT MAX(salary) FROM employees);
Q: What is a Subquery?