SQL_Reference_Guide_Updated-1[1]
SQL_Reference_Guide_Updated-1[1]
‘ ’ :We use it when inserting a text value (we right inside it).
Conditions: Logical operators: `²AND²` / `²&&²`, `²OR²` / `²||²`, `²AND NOT²` / `²AND !²` ,
`²XOR²`.
Comparison Operators: `²=²`, `²<²`, `²>²`, `²<>²` (everything except the value before it).
Join Types:
- ²LEFT JOIN²: Includes all rows from the left table, filling unmatched rows with `²NULL²` on
the right.
- ²RIGHT JOIN²: Includes all rows from the right table, filling unmatched rows with `²NULL²`
on the left.
- ²NATURAL JOIN²: Automatically merges tables based on attributes with the same name.
Part 2: Database Creation and Management
Create a database: ____________________________________________________________________________________
Drop a database:
______________________________________________________________________________________
SHOW WARNINGS;
Part 3: Table Creation and Management
Create a table: ________________________________________________________________________________________
SHOW TABLES;
ALTER TABLE ²table name² ADD COLUMN ²column name² ²attribute type² ²null or not²;
ALTER TABLE ²table name² MODIFY ²attribute name² ²attribute type² ²null or not²;
ALTER TABLE ²table name² DROP FOREIGN KEY ²foreign key name²;
Limit results:
__________________________________________________________________________________________