Week 12 - Databases

Chapter 1

Chapter 2

Chapter 2.5

Chapter 3

Practice

Assignment

Back to core program

Under construction

<aside> 🚧

This page is currently under construction. Please check back later.

</aside>

fdfsklfgnlsd

afaf

SQL Command Description Example
SELECT Retrieves data from one or more tables SELECT * FROM users;
INSERT INTO Adds new rows of data to a table INSERT INTO users (name, email) VALUES ('John', '[email protected]');
UPDATE Modifies existing data in a table UPDATE users SET email = '[email protected]' WHERE id = 1;
DELETE Removes rows from a table DELETE FROM users WHERE id = 1;
CREATE TABLE Creates a new table in the database CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(100));
ALTER TABLE Modifies an existing table structure ALTER TABLE users ADD COLUMN age INT;
DROP TABLE Deletes a table and all its data DROP TABLE users;
WHERE Filters records based on specified conditions SELECT * FROM users WHERE age > 18;
JOIN Combines rows from two or more tables SELECT * FROM users JOIN orders ON users.id = orders.user_id;
GROUP BY Groups rows that have the same values SELECT COUNT(*), country FROM users GROUP BY country;
ORDER BY Sorts the result set in ascending or descending order SELECT * FROM users ORDER BY name ASC;
LIMIT Specifies the number of records to return SELECT * FROM users LIMIT 10;

CC BY-NC-SA 4.0 Icons

*https://hackyourfuture.net/*

Found a mistake or have a suggestion? Let us know in the feedback form.