<aside>
💡 DESCRIBE student; → shows table description/structure
</aside>
<aside>
💡 DROP TABLE student; → deletes the table
</aside>
<aside>
💡 ALTER TABLE student ADD gpa DECIMAL(3, 2); → ****add GPA column with 2 decimal places
</aside>
<aside>
💡 PRIMARY KEY - Example in create table
The PRIMARY KEY constraint uniquely identifies each record in a table.
Primary keys must contain UNIQUE values, and cannot contain NULL values.
</aside>
<aside>
💡 FOREIGN KEY - Example in create table
A FOREIGN KEY is a field (or collection of fields) in one table, that refers to the PRIMARY KEY in another table.
The table with the foreign key is called the child table, and the table with the primary key is called the referenced or parent table.
</aside>
<aside>
💡 A composite key is a primary key, but the difference is that it is made by the combination of more than one column to identify the particular row in the table.
PRIMARY KEY (rollNumber, mobile));
The combination of both rollNumber and mobile would be unique to each row.
</aside>
<aside>
💡 The DISTINCT statement is used to return only distinct (different) values.
SELECT DISTINCT name FROM students;
</aside>