- What is SQL?
SQL (Structured Query Language) is used to store, retrieve, manage, and manipulate data in databases. -
What are the main types of SQL commands?
DDL, DML, DQL, DCL, and TCL. -
What is DDL?
Data Definition Language is used to define database objects like tables (CREATE,ALTER,DROP). -
What is DML?
Data Manipulation Language is used to modify data (INSERT,UPDATE,DELETE). -
What is DQL?
Data Query Language is used to fetch data (SELECT). -
What is DCL?
Data Control Language is used for permissions (GRANT,REVOKE). -
What is TCL?
Transaction Control Language is used to manage transactions (COMMIT,ROLLBACK). -
What is a database?
A database is an organized collection of structured data. -
What is a table?
A table is a collection of rows and columns used to store data. -
What is a row in SQL?
A row represents a single record in a table. -
What is a column in SQL?
A column represents a specific attribute of data in a table. -
What is a schema?
A schema is a logical container for database objects like tables and views. -
What is a primary key?
A primary key uniquely identifies each record in a table. -
What is a foreign key?
A foreign key links one table to another using a referenced key. -
What is a unique key?
It ensures all values in a column are unique. -
What is the difference between primary key and unique key?
Primary key does not allow NULL; unique key allows one NULL (DB dependent). -
What is NOT NULL?
It ensures a column cannot store NULL values. -
What is DEFAULT constraint?
It assigns a default value when no value is provided. -
What is CHECK constraint?
It restricts values allowed in a column. -
What is the difference between DELETE, TRUNCATE, and DROP?
DELETE removes rows, TRUNCATE removes all rows, DROP removes the table.
https://www.youtube.com/playlist?list=PLQM-BpTd9ZSumxwKgJjuJjlx2OcP_W516