⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 crebas.sql

📁 实现很多功能 实现很多功能 实现很多功能
💻 SQL
字号:
/*==============================================================*/
/* DBMS name:      MySQL 5.0                                    */
/* Created on:     6/21/2007 6:24:12 PM                         */
/*==============================================================*/


drop table if exists t_data_sale_flow;

drop table if exists t_dic_chain_store;

drop table if exists t_dic_product;

drop table if exists t_sys_user;

/*==============================================================*/
/* Table: t_data_sale_flow                                      */
/*==============================================================*/
create table t_data_sale_flow
(
   id                   bigint not null auto_increment,
   product_code         bigint comment '产品编号',
   store_code           bigint comment '连锁店编号',
   create_date          timestamp comment '创建日期',
   primary key (id)
);

/*==============================================================*/
/* Table: t_dic_chain_store                                     */
/*==============================================================*/
create table t_dic_chain_store
(
   id                   bigint not null comment '编号',
   name                 varchar(20) comment '名称',
   primary key (id)
);

/*==============================================================*/
/* Table: t_dic_product                                         */
/*==============================================================*/
create table t_dic_product
(
   id                   bigint not null comment '编号',
   name                 varchar(20) comment '产品名称',
   primary key (id)
);

/*==============================================================*/
/* Table: t_sys_user                                            */
/*==============================================================*/
create table t_sys_user
(
   id                   bigint not null auto_increment,
   username             varchar(50),
   password             varchar(50),
   primary key (id)
);

alter table t_data_sale_flow add constraint FK_sale_to_product foreign key (product_code)
      references t_dic_product (id) on delete restrict on update restrict;

alter table t_data_sale_flow add constraint FK_sale_to_store foreign key (store_code)
      references t_dic_chain_store (id) on delete restrict on update restrict;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -