Mysql 创建数据库: CREATE DATABASE [IF NOT EXISTS] [[DEFAULT] CHARACTER SET ] [[DEFAULT] COLLATE ]; 注: [IF NOT EXISTS]
CREATE DATABASE [IF NOT EXISTS] <数据库名> [[DEFAULT] CHARACTER SET <字符集名>] [[DEFAULT] COLLATE <校对规则名>];
注: [IF NOT EXISTS] 方法判断数据库是否存在,不存在才创建
[DEFAULT] CHARACTER SET 数据库的默认字符集
[DEFAULT] COLLATE:字符集的默认校对规则
例:
mysql> CREATE DATABASE test;
Query OK, 1 row affected (0.12 sec)
#查询mysql版本号 sql_mode方式
select version(), @@sql_mode;
#[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column "infORMation_schema.PROFILING.SEQ" which is not functionally dependent on columns in GROUP BY clause; this is incompatible with
SET sql_mode=(SELECT REPLACE(@@sql_mode,"ONLY_FULL_GROUP_BY",""));
CREATE TABLE `lev_wx_user` (
`id` int(20) NOT NULL AUTO_INCREMENT,
`openid` varchar(28) DEFAULT NULL COMMENT "小程序用户的openid",
`nickname` varchar(100) DEFAULT NULL COMMENT "用户昵称",
`avatarurl` varchar(100) DEFAULT NULL COMMENT "用户头像",
`gender` tinyint(1) DEFAULT NULL COMMENT "性别 0-男、1-女",
`country` varchar(100) DEFAULT NULL COMMENT "所在国家",
`province` varchar(100) DEFAULT NULL COMMENT "省份",
`city` varchar(100) DEFAULT NULL COMMENT "城市",
`language` varchar(100) DEFAULT NULL COMMENT "语种",
`create_time` datetime DEFAULT NULL COMMENT "创建/注册时间",
`update_time` datetime DEFAULT NULL COMMENT "更新时间",
`mobile` varchar(50) DEFAULT NULL COMMENT "手机号码",
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT="小程序用户表";
--结束END--
本文标题: uniapp后台api设计(微信user表)
本文链接: https://lsjlt.com/news/3676.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0