Aug 22, 2024
sudo apt update
sudo apt install mysql-server -y
mysql
to start interacting with the database.CREATE DATABASE nc_coffee;
USE nc_coffee;
CREATE TABLE coffee (
id INT,
name VARCHAR(255),
region VARCHAR(255),
roast VARCHAR(255)
);
INSERT INTO coffee VALUES (1, 'Default Roast', 'Ethiopia', 'Light');
SELECT * FROM coffee;
SELECT * FROM Avengers WHERE origin = 'Earth';
UPDATE Avengers SET last_name = NULL WHERE first_name = 'Groot';
DELETE FROM Avengers WHERE first_name = 'Jeff';
SELECT * FROM Avengers ORDER BY age ASC;
ALTER TABLE Avengers ADD COLUMN beard BOOLEAN;