2023/6/8 00:22:13 CREATE TABLE Customers ( customer_id INT PRIMARY KEY, customer_name VARCHAR(50), customer_sex CHAR(1), phone_number VARCHAR(20), address VARCHAR(100), email VARCHAR(50), checked_in_room INT REFERENCES Rooms(room_id) ); 往表里写入10条数据
时间: 2024-03-14 17:48:57 浏览: 88
客户数据录入表
好的,以下是往表里写入10条数据的SQL语句:
```
INSERT INTO Customers (customer_id, customer_name, customer_sex, phone_number, address, email, checked_in_room)
VALUES (1, '张三', '男', '13888888888', '北京市海淀区', 'zhangsan@example.com', 101);
INSERT INTO Customers (customer_id, customer_name, customer_sex, phone_number, address, email, checked_in_room)
VALUES (2, '李四', '男', '13999999999', '上海市黄浦区', 'lisi@example.com', 102);
INSERT INTO Customers (customer_id, customer_name, customer_sex, phone_number, address, email, checked_in_room)
VALUES (3, '王五', '女', '13666666666', '广州市天河区', 'wangwu@example.com', 103);
INSERT INTO Customers (customer_id, customer_name, customer_sex, phone_number, address, email, checked_in_room)
VALUES (4, '赵六', '男', '13444444444', '深圳市福田区', 'zhaoliu@example.com', 104);
INSERT INTO Customers (customer_id, customer_name, customer_sex, phone_number, address, email, checked_in_room)
VALUES (5, '钱七', '女', '13555555555', '杭州市西湖区', 'qianqi@example.com', 105);
INSERT INTO Customers (customer_id, customer_name, customer_sex, phone_number, address, email, checked_in_room)
VALUES (6, '孙八', '男', '13333333333', '南京市鼓楼区', 'sunba@example.com', 106);
INSERT INTO Customers (customer_id, customer_name, customer_sex, phone_number, address, email, checked_in_room)
VALUES (7, '周九', '女', '13111111111', '成都市锦江区', 'zhoujiu@example.com', 107);
INSERT INTO Customers (customer_id, customer_name, customer_sex, phone_number, address, email, checked_in_room)
VALUES (8, '吴十', '男', '13222222222', '武汉市江汉区', 'wushi@example.com', 108);
INSERT INTO Customers (customer_id, customer_name, customer_sex, phone_number, address, email, checked_in_room)
VALUES (9, '郑一', '男', '13911112222', '重庆市渝北区', 'zhengyi@example.com', 109);
INSERT INTO Customers (customer_id, customer_name, customer_sex, phone_number, address, email, checked_in_room)
VALUES (10, '秦二', '女', '13822221111', '天津市和平区', 'qiner@example.com', 110);
```
注意,以上SQL语句仅供参考,具体的数据应根据实际情况进行修改。
阅读全文