0% found this document useful (0 votes)
3 views2 pages

SQL Interview Flashcards

This document provides SQL flashcards for interview preparation, covering key concepts such as SQL commands, primary and foreign keys, joins, normalization, and differences between various SQL operations. It includes specific questions and answers about SQL functionalities, including examples of queries and data types. The content is designed to help individuals prepare for SQL-related interviews.

Uploaded by

Anurag Tiwari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

SQL Interview Flashcards

This document provides SQL flashcards for interview preparation, covering key concepts such as SQL commands, primary and foreign keys, joins, normalization, and differences between various SQL operations. It includes specific questions and answers about SQL functionalities, including examples of queries and data types. The content is designed to help individuals prepare for SQL-related interviews.

Uploaded by

Anurag Tiwari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

SQL Flashcards - Interview Preparation

Q: What is SQL?

A: SQL (Structured Query Language) is used to communicate with databases to create, read, update, and

delete data.

Q: What are the types of SQL commands?

A: DDL, DML, DQL, DCL, TCL.

Q: Difference between WHERE and HAVING?

A: WHERE filters rows before grouping; HAVING filters groups after GROUP BY.

Q: What is a Primary Key?

A: A column that uniquely identifies each row and cannot be NULL.

Q: What is a Foreign Key?

A: A field in one table that refers to the Primary Key in another table.

Q: What are JOINS?

A: JOINS combine rows from two or more tables based on a related column.

Q: What is Normalization?

A: Organizing data to reduce redundancy; follows 1NF, 2NF, 3NF, etc.

Q: Difference between DELETE, TRUNCATE, and DROP?

A: DELETE: row by row; TRUNCATE: all rows quickly; DROP: deletes the table.

Q: Query for second highest salary?

A: SELECT MAX(salary) FROM employees WHERE salary < (SELECT MAX(salary) FROM employees);

Q: Difference between CHAR and VARCHAR?


SQL Flashcards - Interview Preparation

A: CHAR is fixed-length; VARCHAR is variable-length.

Q: What is a Subquery?

A: A query nested inside another SQL query.

You might also like