问答详情
源自:6-3 客户管理查询三

带有数据的sql

老师可以把带有数据的sql发一下吗?

提问者:Sweet2021 2021-09-06 01:40

个回答

  • 老猿
    2021-10-04 18:10:36

    抱歉,这个不能发

  • 逐_鹿
    2022-02-06 23:55:51

    自己造数据多好。


    这是我造的数据

  • qq_唯俏的爱丶只是落幕的残阳_0
    2021-09-29 11:37:22

    SET NAMES utf8mb4;

    SET FOREIGN_KEY_CHECKS = 0;


    -- ----------------------------

    -- Table structure for customer

    -- ----------------------------

    DROP TABLE IF EXISTS `customer`;

    CREATE TABLE `customer`  (

      `customer_id` bigint(0) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',

      `real_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '真实姓名',

      `sex` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '性别',

      `age` tinyint(0) UNSIGNED NULL DEFAULT NULL COMMENT '年龄',

      `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '邮箱',

      `phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '手机号码',

      `address` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '地址',

      `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',

      `modified_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',

      `create_account_id` bigint(0) UNSIGNED NULL DEFAULT NULL COMMENT '创建人',

      `modified_account_id` bigint(0) UNSIGNED NULL DEFAULT NULL COMMENT '修改人',

      `deleted` tinyint(0) UNSIGNED NULL DEFAULT 0 COMMENT '逻辑删除标识(0、否 1、是)',

      PRIMARY KEY (`customer_id`) USING BTREE

    ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '客户表' ROW_FORMAT = Dynamic;


    -- ----------------------------

    -- Records of customer

    -- ----------------------------

    INSERT INTO `customer` VALUES (1, '张强', '男', 18, '1@163.com', '12580', '北京', '2021-09-29 10:55:22', NULL, NULL, NULL, 0);

    INSERT INTO `customer` VALUES (2, '王伟', '男', 25, '1@163.com', '177777', '南京', '2021-09-29 10:55:54', NULL, NULL, NULL, 0);


    SET FOREIGN_KEY_CHECKS = 1;