+ 立即免费创建此表 返回数据库大全

MySQL建表SQL语句

数据库结构:B2C商城-商品表:https://open.yesapi.cn/tablelist/yesapi_xbinstore_tb_item.html


-- 数据库大全:B2C商城-商品表
-- 来源:YesApi.cn
CREATE TABLE `yesapi_xbinstore_tb_item` (
    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `title` varchar(100) NOT NULL COMMENT '商品标题',
    `sell_point` varchar(500) NOT NULL COMMENT '商品卖点',
    `price` bigint(20) NOT NULL COMMENT '商品价格,单位为:分',
    `num` int(10) NOT NULL COMMENT '库存数量',
    `barcode` varchar(30) NOT NULL COMMENT '商品条形码',
    `image` varchar(500) NOT NULL COMMENT '商品图片',
    `cid` bigint(10) NOT NULL COMMENT '所属类目,叶子类目',
    `yesapi_xbinstore_tb_item_status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '商品状态,1-正常,2-下架,3-删除',
    `weight` int(10) NOT NULL COMMENT '重量',
    `created` datetime NOT NULL COMMENT '创建时间',
    `updated` datetime NOT NULL COMMENT '更新时间',
    `colour` varchar(10) NOT NULL COMMENT '颜色',
    `size` varchar(10) NOT NULL COMMENT '尺寸',
    KEY `cid` (`cid`),
    KEY `yesapi_xbinstore_tb_item_status` (`yesapi_xbinstore_tb_item_status`),
    KEY `updated` (`updated`),
    PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT 'B2C商城-商品表';

复制后,到数据库执行,即可创建此数据库表。


MySQL数据库表结构设计

第 1-13 条, 共 13 条.
字段名称字段类型字段默认值是否允许为空字段描述索引字段数据示例
titlevarchar(100)商品标题无索引
sell_pointvarchar(500)商品卖点无索引
pricebigint(20)商品价格,单位为:分无索引
numint(10)库存数量无索引
barcodevarchar(30)商品条形码无索引
imagevarchar(500)商品图片无索引
cidbigint(10)所属类目,叶子类目普通索引
yesapi_xbinstore_tb_item_statustinyint(4)1商品状态,1-正常,2-下架,3-删除普通索引1
weightint(10)重量无索引
createddatetime创建时间无索引
updateddatetime更新时间普通索引
colourvarchar(10)颜色无索引
sizevarchar(10)尺寸无索引

猜你喜欢

MySQL数据库设计 B2C商城-分类

MySQL数据库设计 B2C商城-分类图片

MySQL数据库设计 B2C商城-次级分类

MySQL数据库设计 B2C商城-热门关键词

MySQL数据库设计 B2C商城-首页轮播广告

MySQL数据库设计 B2C商城-商品描述表

MySQL数据库设计 B2C商城-商品规则参数

MySQL数据库设计 B2C商城-商品规格和商品的关系表

MySQL数据库设计 B2C商城-后台用户表

MySQL数据库设计 B2C商城-订单

MySQL数据库设计 B2C商城-订单项目

MySQL数据库设计 B2C商城-消息

MySQL数据库设计 B2C商城-用户表

MySQL数据库设计 B2C商城-用户地址



回到顶部 ↑