0% found this document useful (0 votes)
3 views

SQL REV

Uploaded by

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

SQL REV

Uploaded by

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

SQL kya hai?

SQL (Structured Query Language) ek language hai jo relational


databases se interact karne ke liye use hoti hai.

SQL commands ke types?


DML (Data Manipulation Language): SELECT, INSERT, UPDATE, DELETE
DDL (Data Definition Language): CREATE, ALTER, DROP
DCL (Data Control Language): GRANT, REVOKE
TCL (Transaction Control Language): COMMIT, ROLLBACK
Primary Key: Ek unique identifier jo row ko uniquely identify karta hai.

Foreign Key: Ek column jo ek table ke primary key ko reference karta hai kisi
aur table mein.
{For ex: man lo kisi employee table ka PK hai emp ID(emp_id(PK), name, post, salary) and kisi 2nd
team table (name, team_no, emp_id, report_to,) to emp_id in second table will be Foreign Key kyuki wo
employee table ke Primary key ke liye refrence ke use ho rha. }

Unique Key: Ek key jo ensure karti hai ki column mein duplicate values na ho.

Database: Data ka organized collection jo structured format mein store hota


hai.

Table: Rows aur columns ka collection jahan data store hota hai.

Join: Tables ko combine karne ke liye use hota hai. Types hain INNER JOIN,
LEFT JOIN, RIGHT JOIN, FULL JOIN.

INNER JOIN vs OUTER JOIN: INNER JOIN common records dikhata hai, jabki
OUTER JOIN ek table ke sare records dikhata hai, saath hi matching records
dusre table se bhi.

NULL value: Yeh indicate karta hai ki value missing hai ya unknown hai.

Unique Records Retrieve Karna: SELECT DISTINCT query use karo.

WHERE vs HAVING: WHERE clause rows filter karta hai, HAVING clause
aggregated data filter karta hai.

GROUP BY aur ORDER BY: GROUP BY rows ko aggregate karne ke liye use
hota hai, ORDER BY sorting ke liye.
Subquery: Ek query jo doosri query ke andar hoti hai.

Stored Procedure: Predefined SQL code ka set jo reusable hota hai.

Stored Procedure vs Function: Procedure side effects produce kar sakta hai,
function value return karta hai.

Table Create Karna: CREATE TABLE table_name (column1 datatype, column2


datatype, ...)

Normalization: Data redundancy kam karne ka process. Types: 1NF, 2NF,


3NF, BCNF, etc.

Denormalization: Performance improve karne ke liye normalization ko


reverse karna.

View: Ek virtual table jo SELECT query ke result ko represent karta hai. Table
se data directly nahi store hota.

You might also like