Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SHOW DATABASES;
- CREATE DATABASE autopark;
- USE autopark;
- CREATE TABLE persons (
- id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
- firstname VARCHAR(200) NOT NULL,
- lastname VARCHAR(200) NOT NULL,
- age INT,
- city VARCHAR(100)
- );
- INSERT INTO persons
- VALUES (1, 'Gosho', 'Borisov', 32, 'Kaspichan');
- INSERT INTO persons (id, firstname, lastname, age, city)
- VALUES (2, 'Stamat', 'Todorov', 22, 'Lesidren');
- INSERT INTO persons (firstname, lastname, city)
- VALUES ('Slavi', 'Trifonov', 'Pleven');
- INSERT INTO persons (firstname, lastname, city)
- VALUES ('Ani', 'Vasileva', 'Pleven');
- SELECT * FROM persons WHERE city = 'Pleven';
- SELECT * FROM persons;
- DELETE FROM persons WHERE id = 5;
- UPDATE persons SET city = 'Pleven' WHERE id = 2;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement