/* Navicat MySQL Data Transfer Source Server : kuyu Source Server Version : 50622 Source Host : localhost:3306 Source Database : wgj Target Server Type : MYSQL Target Server Version : 50622 File Encoding : 65001 Date: 2023-03-21 14:15:45 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for lb -- ---------------------------- DROP TABLE IF EXISTS `lb`; CREATE TABLE `lb` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of lb -- ---------------------------- INSERT INTO `lb` VALUES ('1', '水果'); INSERT INTO `lb` VALUES ('2', '面包'); INSERT INTO `lb` VALUES ('3', '粉'); INSERT INTO `lb` VALUES ('4', '衣服'); -- ---------------------------- -- Table structure for orderitem -- ---------------------------- DROP TABLE IF EXISTS `orderitem`; CREATE TABLE `orderitem` ( `id` int(11) NOT NULL AUTO_INCREMENT, `product_id` int(11) DEFAULT NULL, `order_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of orderitem -- ---------------------------- INSERT INTO `orderitem` VALUES ('1', '1', '1'); INSERT INTO `orderitem` VALUES ('2', '2', '1'); INSERT INTO `orderitem` VALUES ('3', '3', '1'); INSERT INTO `orderitem` VALUES ('6', '2', '2'); INSERT INTO `orderitem` VALUES ('7', '3', '2'); -- ---------------------------- -- Table structure for sp -- ---------------------------- DROP TABLE IF EXISTS `sp`; CREATE TABLE `sp` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name1` varchar(255) DEFAULT NULL, `price` decimal(10,2) DEFAULT NULL, `lb_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of sp -- ---------------------------- INSERT INTO `sp` VALUES ('1', '香蕉', '20.00', '1'); INSERT INTO `sp` VALUES ('2', '葡萄', '30.00', '1'); INSERT INTO `sp` VALUES ('3', '苹果', '50.00', '1'); -- ---------------------------- -- Table structure for tb_idcard -- ---------------------------- DROP TABLE IF EXISTS `tb_idcard`; CREATE TABLE `tb_idcard` ( `id` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(255) DEFAULT NULL COMMENT '身份证号', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of tb_idcard -- ---------------------------- INSERT INTO `tb_idcard` VALUES ('1', '011216326'); INSERT INTO `tb_idcard` VALUES ('2', '51155'); INSERT INTO `tb_idcard` VALUES ('3', '856464156545'); -- ---------------------------- -- Table structure for tb_order -- ---------------------------- DROP TABLE IF EXISTS `tb_order`; CREATE TABLE `tb_order` ( `id` int(11) NOT NULL AUTO_INCREMENT, `number` int(11) DEFAULT NULL COMMENT '订单号', `user_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `userid_fk` (`user_id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of tb_order -- ---------------------------- INSERT INTO `tb_order` VALUES ('1', '123', '1'); INSERT INTO `tb_order` VALUES ('2', '456', '1'); INSERT INTO `tb_order` VALUES ('3', '789', '2'); INSERT INTO `tb_order` VALUES ('4', '125', '3'); -- ---------------------------- -- Table structure for tb_person -- ---------------------------- DROP TABLE IF EXISTS `tb_person`; CREATE TABLE `tb_person` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL COMMENT '名字', `age` int(11) DEFAULT NULL COMMENT '年龄', `card_id` int(11) DEFAULT NULL, `sex` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), KEY `id_card_f` (`card_id`), CONSTRAINT `id_card_f` FOREIGN KEY (`card_id`) REFERENCES `tb_idcard` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of tb_person -- ---------------------------- INSERT INTO `tb_person` VALUES ('1', '张三', '23', '1', '男'); INSERT INTO `tb_person` VALUES ('2', '李四', '35', '2', '男'); INSERT INTO `tb_person` VALUES ('3', '小红', '18', '3', '女'); -- ---------------------------- -- Table structure for tb_product -- ---------------------------- DROP TABLE IF EXISTS `tb_product`; CREATE TABLE `tb_product` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, `price` decimal(10,2) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of tb_product -- ---------------------------- INSERT INTO `tb_product` VALUES ('1', 'jkl', '80.00'); INSERT INTO `tb_product` VALUES ('2', 'qhj', '20.00'); INSERT INTO `tb_product` VALUES ('3', 'tyu', '60.00'); INSERT INTO `tb_product` VALUES ('4', 'qwd', '100.00'); -- ---------------------------- -- Table structure for tb_user -- ---------------------------- DROP TABLE IF EXISTS `tb_user`; CREATE TABLE `tb_user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(255) DEFAULT NULL COMMENT '用户名', `address` varchar(255) DEFAULT NULL COMMENT '地址', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of tb_user -- ---------------------------- INSERT INTO `tb_user` VALUES ('1', 'uzi', '湖北'); INSERT INTO `tb_user` VALUES ('2', 'clearlove', '南宁'); INSERT INTO `tb_user` VALUES ('3', 'mekio', '上海'); INSERT INTO `tb_user` VALUES ('4', 'aaaaa', 'aaa'); -- ---------------------------- -- Table structure for tb_worker -- ---------------------------- DROP TABLE IF EXISTS `tb_worker`; CREATE TABLE `tb_worker` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(32) DEFAULT NULL, `age` int(11) DEFAULT NULL, `sex` varchar(8) DEFAULT NULL, `number` int(11) DEFAULT NULL, `id_card` int(11) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `worker_id` (`number`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of tb_worker -- ---------------------------- INSERT INTO `tb_worker` VALUES ('2', '张三', '30', '女', '2035', '1'); INSERT INTO `tb_worker` VALUES ('3', '李四', '40', '男', '3635', null); INSERT INTO `tb_worker` VALUES ('4', 'c', '15', '男', '1005', null);
标签:INSERT,上课,--,数据库,----------------------------,VALUES,tb,INTO From: https://www.cnblogs.com/TokaiTeio32/p/17239868.html