sql-join Flashcards
1
Q
What is a foreign key?
A
A foreign key is a column in a database table that references the primary key of another table.
2
Q
How do you join two SQL tables?
A
SELECT column1, column2, …
FROM table1
JOIN table2
ON table1.column = table2.column;
3
Q
How do you temporarily rename columns or tables in a SQL statement?
A
SELECT column_name AS new_column_name
FROM table_name;