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

MySQL建表SQL语句

数据库结构:小白商城商品表:https://open.yesapi.cn/tablelist/yesapi_shop_goods.html


-- 数据库大全:小白商城商品表
-- 来源:YesApi.cn
CREATE TABLE `yesapi_shop_goods` (
    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `goods_name` varchar(255) NULL COMMENT '商品名称',
    `goods_desc` text NULL COMMENT '商品详细描述',
    `goods_title` varchar(500) NULL COMMENT '一句话卖点',
    `goods_price` int(11) NULL DEFAULT '0' COMMENT '商品价格(分)',
    `goods_market_price` int(11) NULL DEFAULT '0' COMMENT '商品市场价格(分)',
    `goods_status` tinyint(4) NULL DEFAULT '0' COMMENT '商品状态',
    `goods_tag` varchar(200) NULL COMMENT '商品标签',
    `goods_img` varchar(255) NULL COMMENT '商品图片',
    `view_times` int(11) NULL DEFAULT '0' COMMENT '人气',
    `like_times` int(11) NULL DEFAULT '0' COMMENT '收藏数量',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT '小白商城商品表';

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


MySQL数据库表结构设计

第 1-10 条, 共 10 条.
字段名称字段类型字段默认值是否允许为空字段描述索引字段数据示例
goods_namevarchar(255)商品名称无索引
goods_desctext商品详细描述无索引
goods_titlevarchar(500)一句话卖点无索引
goods_priceint(11)0商品价格(分)无索引0
goods_market_priceint(11)0商品市场价格(分)无索引0
goods_statustinyint(4)0商品状态无索引0
goods_tagvarchar(200)商品标签无索引
goods_imgvarchar(255)商品图片无索引
view_timesint(11)0人气无索引0
like_timesint(11)0收藏数量无索引0

猜你喜欢

MySQL数据库设计 小白商城订单表



回到顶部 ↑