basics
database is a structured collection of data
In a database, a schema is essentially a blueprint or structure that defines how data is organized. It includes:
🔧 What a Schema Contains:
Tables (with their columns and data types)
Relationships between tables (foreign keys)
Indexes
Views
Stored procedures and functions
Constraints (like primary keys, unique constraints, etc.)











DISTINCT is unique - do not show repeated values

only print Pune, Mumbai, Delhi - not repeat it












GROUP BY CITY

SELECT COLUMN AND MUST GROUP BY SAME COLUMN AND CANNOT SELECT OTHER COLUMN JUST OPERATION ON OTHER COLUMN














DELETE FROM STUDENT; will delete all data
PRIMARY KEY: Unique and not null key
FOREIGHN KEY



CASCADING: Changes in one table also reflect in another table (foreign key)








Alias













Last updated