Skip to main content

Posts

Showing posts with the label advanced SQL interview questions

Mastering SQL 100 Essential Interview Questions and Answers

1. Basic SQL Queries What is SQL? SQL (Structured Query Language) is a standard programming language for managing and manipulating relational databases. What are the different types of SQL commands? DDL  (Data Definition Language): Commands like  CREATE ,  ALTER ,  DROP . DML  (Data Manipulation Language): Commands like  SELECT ,  INSERT ,  UPDATE ,  DELETE . DCL  (Data Control Language): Commands like  GRANT ,  REVOKE . TCL  (Transaction Control Language): Commands like  COMMIT ,  ROLLBACK . What is a primary key? A primary key is a unique identifier for a record in a table. It cannot contain NULL values. What is a foreign key? A foreign key is a field in one table that uniquely identifies a row of another table. It establishes a relationship between the two tables. What is normalization? Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity. What are the d...