博客列表 >10月18日作业-MYSQL新增表及导出

10月18日作业-MYSQL新增表及导出

鬼才哥-秋兜
鬼才哥-秋兜原创
2021年10月19日 11:06:19540浏览

用户表

  1. SET NAMES utf8mb4;
  2. SET FOREIGN_KEY_CHECKS = 0;
  3. -- ----------------------------
  4. -- Table structure for php_user
  5. -- ----------------------------
  6. DROP TABLE IF EXISTS `php_user`;
  7. CREATE TABLE `php_user` (
  8. `id` int(11) NOT NULL,
  9. `uid` int(11) NULL DEFAULT NULL,
  10. `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  11. `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  12. `mobile` char(11) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  13. PRIMARY KEY (`id`) USING BTREE
  14. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  15. SET FOREIGN_KEY_CHECKS = 1;

商品表

  1. SET NAMES utf8mb4;
  2. SET FOREIGN_KEY_CHECKS = 0;
  3. -- ----------------------------
  4. -- Table structure for php_goods
  5. -- ----------------------------
  6. DROP TABLE IF EXISTS `php_goods`;
  7. CREATE TABLE `php_goods` (
  8. `id` int(11) NOT NULL,
  9. `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  10. `price` decimal(10, 2) NULL DEFAULT NULL,
  11. `content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  12. PRIMARY KEY (`id`) USING BTREE
  13. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  14. SET FOREIGN_KEY_CHECKS = 1;

订单表

  1. SET NAMES utf8mb4;
  2. SET FOREIGN_KEY_CHECKS = 0;
  3. -- ----------------------------
  4. -- Table structure for php_order
  5. -- ----------------------------
  6. DROP TABLE IF EXISTS `php_order`;
  7. CREATE TABLE `php_order` (
  8. `id` int(11) NOT NULL,
  9. `goods_id` int(11) NULL DEFAULT NULL,
  10. `uid` int(11) NULL DEFAULT NULL,
  11. `pay_price` decimal(10, 2) NULL DEFAULT NULL,
  12. `pay_time` datetime NULL DEFAULT NULL,
  13. PRIMARY KEY (`id`) USING BTREE
  14. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  15. SET FOREIGN_KEY_CHECKS = 1;
声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议