Real_SQL_and_Coding_Interview_Questions
Real_SQL_and_Coding_Interview_Questions
1. Q: What is SQL?
A: SQL stands for Structured Query Language, used to communicate with databases.
A: A primary key uniquely identifies each row in a table and cannot be NULL.
A: A foreign key links two tables and refers to the primary key in another table.
A: INNER JOIN returns matching rows; LEFT JOIN returns all rows from the left table.
7. Q: What is normalization?
8. Q: What is denormalization?
9. Q: What is a constraint?
A: Rules applied on columns to limit the data, e.g., NOT NULL, UNIQUE.
A: DELETE removes specific rows; TRUNCATE removes all rows; DROP removes the table.
A: Use arithmetic: a = a + b, b = a - b, a = a - b.