• 数据库中可能会出现的表


    --表:T_UsersInfo(用户详情表)

    if exists(select name from sys.objects where name='T_UserInfo')
    drop table T_UserInfo
    go

    create table T_UserInfo
    (
        C_UserID int identity(1,1),
        C_UserName nvarchar(20),
        C_RealName nvarchar(20),
        C_Age int,
        C_Sex bit,
        C_Mobile char(11),
        C_Phone char(11),
        C_Email nvarchar(50),
        constraint PK_T_UserInfo_C_UserID primary key(C_UserID)   
    )
    go

    --表:T_Users(用户表)
    if exists(select name from sys.objects where name='T_Users')
    drop table T_Users
    go

    create table T_Users
    (
        C_UserID int identity(1,1),
        C_UserName nvarchar(50),
        C_PassWord nvarchar(50),
        C_RegDate datetime default getdate(),--注册时间
        C_LoginCount int,
        C_LastLoginDate datetime default getdate(),
        C_PassWordQuestion nvarchar(50),
        C_PassWordAnswer nvarchar(50),
        C_IsForbidden bit,
        constraint PK_T_Users_C_UserID primary key(C_UserID)
    )
    go

    --表:T_ProductClass(产品类别表)

    if exists(select name from sys.objects where name='T_ProductClass')
    drop table T_ProductClass
    go

    create table T_ProductClass
    (
        C_ProductClassID int,--产品类别ID
        C_ParentID int,--父ID
        C_ClassName nvarchar(50),--类别名称
        C_Sorting int,--排序
        constraint PK_T_ProductClass_C_ProductClassID primary key(C_ProductClassID)
    )
    go

    --表:T_Product(产品表)

    if exists(select name from sys.objects where name='T_Product')
    drop table T_Product
    go

    create table T_Product
    (
        C_ProductID int,--产品ID
        C_ProductClassID int,--产品类别ID
        C_ProductName nvarchar(50),--产品名称
        C_SerialNum nvarchar(50),--序列号
        C_ProductModel nvarchar(50),--规格
        C_SampleImage nvarchar(100),--缩略图
        C_SideImage nvarchar(100),--侧面图
        C_Description ntext,--描述
        C_IsLastest bit,--最新
        C_ISRecommend bit,--推荐
        C_Sorting bit,--排序
        constraint PK_T_Product_C_ProductID primary key(C_ProductID)
    )
    go

    --表:T_Employees(员工表)
    if exists(select name from sys.objects where name='T_Employees')
    drop table T_Employees
    go

    create table T_Employees
    (
        C_Number varchar(20),--编号
        C_Name varchar(20),--姓名
        C_Sex bit,--性别
        C_Department varchar(20),--部门
        C_Phone varchar(20),--电话
        C_Address varchar(20),--地址
    )
    go

    --表:T_Goods(进货表)
    if exists(select name from sys.objects where name='T_Goods')
    drop table T_Goods
    go

    create table T_Goods
    (
        C_CoodsID int identity primary key,--商品编号
        C_GoodsName varchar(20),--商品名称
        C_Manufacturers varchar(20),--生产厂商
        C_PurchasePrice money,--进货价
        C_RetailPrice money,--零售价
        C_Sum int,--数量   
        C_PurchaseTime DateTime,--进货时间
        C_PurchaseEmployeesNumber varchar(20),--进货员工编号
    )
    go

    --表:T_Sell(已售商品表表)
    if exists(select name from sys.objects where name='T_Sell')
    drop table T_Sell
    go

    create table T_Sell
    (
        C_SellID int identity primary key,--销售编号
        C_CoodsID int,--商品编号
        C_Sum int,--数量
        C_SellTime DateTime,--售出时间
        C_SellEmployeesNumber varchar(20)--售货员工编号
    )
    go

    --表:T_Manufacturers(生产厂商表)
    if exists(select name from sys.objects where name='T_Manufacturers')
    drop table T_Manufacturers
    go

    create table T_Manufacturers
    (
        C_ManufacturerNo int identity primary key,--厂商编号
        C_Manufacturers varchar(30),--生产厂商
        C_LegalRepresentative varchar(20),--法人代表
        C_CompanyAddress varchar(100)--厂商地址
    )
    go

  • 相关阅读:
    使用 Terraform 在阿里云上快速部署 MQTT 集群
    Neuron Newsletter 202206|新增 1 个南向驱动、开源前端代码
    EMQX Cloud 更新:日志分析增加更多参数,监控运维更省心
    os:systemctl文档(四)systemd.unit
    教育:中国孩子缺失的教育
    os:apt sources.list文件说明
    asm:80x86寄存器详解(转载)
    asm:gdb资源集合(linux)
    asm: gdb 文档(gdb调试工具)
    书法:书法的理解
  • 原文地址:https://www.cnblogs.com/meroselove/p/2159508.html
Copyright © 2020-2023  润新知