问答社区-分类 - MySQL数据库表结构设计

yesapi_whatsns_category
字段数:17 分类:问答社区 使用次数:1

问答社区-分类 是一个MySQL数据库表,表名为 yesapi_whatsns_category, 共包含 17 个字段。 所属分类:问答社区。 该表提供了完整的字段定义、类型说明、默认值、索引设计和示例数据,可直接用于MySQL数据库建表。

💡 使用方式:复制下方SQL语句到MySQL客户端执行即可创建此表;也可通过果创云一键创建并生成RESTful API接口,免去手动部署。

MySQL数据库表结构设计

第 1-17 条, 共 17 条.
字段名称字段类型字段默认值是否允许为空字段描述索引字段数据示例
yesapi_whatsns_category_namechar(30)无索引
dirchar(30)无索引
pidsmallint(5)0普通索引0
gradetinyint(1)0普通索引0
displayordertinyint(3)0无索引0
questionsint(10)0普通索引0
aliasvarchar(200)无索引
miaosuvarchar(500)无索引
followersint(10)0普通索引0
imagevarchar(200)无索引
templatevarchar(200)无索引
articletemplatevarchar(200)topicone无索引topicone
onlybackgroundint(2)0普通索引0
isshowindexint(10)1普通索引1
isusearticleint(10)1普通索引1
isuseaskint(10)1普通索引1
iscourseint(10)0普通索引0

MySQL建表SQL语句

来源:问答社区-分类  |  链接:https://open.yesapi.cn/tablelist/yesapi_whatsns_category.html

SQL
-- 数据库大全:问答社区-分类
-- 来源:YesApi.cn
CREATE TABLE `yesapi_whatsns_category` (
    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `yesapi_whatsns_category_name` char(30) NULL COMMENT '',
    `dir` char(30) NULL COMMENT '',
    `pid` smallint(5) NULL DEFAULT '0' COMMENT '',
    `grade` tinyint(1) NULL DEFAULT '0' COMMENT '',
    `displayorder` tinyint(3) NULL DEFAULT '0' COMMENT '',
    `questions` int(10) NULL DEFAULT '0' COMMENT '',
    `alias` varchar(200) NULL COMMENT '',
    `miaosu` varchar(500) NULL COMMENT '',
    `followers` int(10) NULL DEFAULT '0' COMMENT '',
    `image` varchar(200) NULL COMMENT '',
    `template` varchar(200) NULL COMMENT '',
    `articletemplate` varchar(200) NULL DEFAULT 'topicone' COMMENT '',
    `onlybackground` int(2) NULL DEFAULT '0' COMMENT '',
    `isshowindex` int(10) NULL DEFAULT '1' COMMENT '',
    `isusearticle` int(10) NULL DEFAULT '1' COMMENT '',
    `isuseask` int(10) NULL DEFAULT '1' COMMENT '',
    `iscourse` int(10) NULL DEFAULT '0' COMMENT '',
    KEY `pid` (`pid`),
    KEY `grade` (`grade`),
    KEY `questions` (`questions`),
    KEY `followers` (`followers`),
    KEY `onlybackground` (`onlybackground`),
    KEY `isshowindex` (`isshowindex`),
    KEY `isusearticle` (`isusearticle`),
    KEY `isuseask` (`isuseask`),
    KEY `iscourse` (`iscourse`),
    PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT '问答社区-分类';

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

📖 如何使用 问答社区-分类 数据库表

  1. 手动建表:复制上方SQL语句,在MySQL客户端(如Navicat、phpMyAdmin、命令行)中执行即可
  2. 一键创建:点击「立即免费创建此表」按钮,果创云自动生成表和RESTful API接口
  3. API调用:创建表后,即可通过HTTP接口对数据进行增删改查操作
  4. 二次开发:支持自定义字段、添加业务逻辑、生成小程序/APP后端接口

❓ 常见问题

Q:问答社区-分类表的主键是什么?
A:主键为 id 字段,类型为 bigint(20) unsigned NOT NULL AUTO_INCREMENT,自增无符号整数。
Q:如何在项目中使用这张表?
A:可以直接复制建表SQL到MySQL数据库中执行创建,也可以通过果创云平台一键创建并自动生成RESTful API接口,无需手动部署。
Q:这张表的索引有哪些?
A:pid(普通索引)、grade(普通索引)、questions(普通索引)、followers(普通索引)、onlybackground(普通索引)、isshowindex(普通索引)、isusearticle(普通索引)、isuseask(普通索引)、iscourse(普通索引),以及主键索引(id)。

猜你喜欢

回到顶部 ↑