使用MySQL帮我创建一个User表,并且往里面添加十条测试数据
时间: 2023-05-26 17:01:54 浏览: 117
CREATE TABLE User (
id INT(11) NOT NULL AUTO_INCREMENT,
name VARCHAR(50) NOT NULL,
age INT(11) NOT NULL,
email VARCHAR(50) NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO User (name, age, email) VALUES
('Lucy', 25, 'lucy@example.com'),
('John', 30, 'john@example.com'),
('Kate', 29, 'kate@example.com'),
('Tom', 28, 'tom@example.com'),
('Alice', 27, 'alice@example.com'),
('David', 24, 'david@example.com'),
('Mary', 26, 'mary@example.com'),
('Bob', 32, 'bob@example.com'),
('Lily', 23, 'lily@example.com'),
('Mike', 31, 'mike@example.com');
阅读全文