Sample Data #1

This is sample data, this has been created for educational purposes and you can use this how you wish.

Make sure to create your tables first:

USE db;

CREATE TABLE users (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100),
    email VARCHAR(255),
    age INT
);

Now Insert our data to table users

USE db;

INSERT INTO users (name, email, age) VALUES ('Alice Johnson', 'alice@example.com', 28);
INSERT INTO users (name, email, age) VALUES ('Bob Smith', 'bob@example.com', 35);
INSERT INTO users (name, email, age) VALUES ('Charlie Davis', 'charlie@example.com', 22);
INSERT INTO users (name, email, age) VALUES ('Dana Lee', 'dana@example.com', 40);
INSERT INTO users (name, email, age) VALUES ('Eve Martinez', 'eve@example.com', 31);

Now we can send SQL queries to see our data in the database:

USE db;

SELECT * FROM users;

SELECT name, email from users;

SELECT * FROM users WHERE age > 30;
circle-info

If you are having problems, please click one of the following videos:

MySQL Tutorialarrow-up-right Pure SQL Tutorialarrow-up-right

Last updated