0
点赞
收藏
分享

微信扫一扫

Mysql中数据库表的名称可否为纯数字?

代码敲到深夜 2022-03-11 阅读 38

可以,举例建表如下:
CREATE TABLE if not exists 111111 (Date date, High float, Low float, Open float,Close float, Volume int, AdjClose float)
注意:sql语句中提及该表的时候要用到键盘“!”前的“·”字符。
在Navicat中测试sql语句,运行成功。
建表名为数字的表
此外,如果字段名想要带有空格,如字段名为update time,可以将其用符号“·”括起:

CREATE TABLE if not exists `600210` (Date date, High float, Low float, Open float,Close float, Volume int, `Adj Close` float)
举报

相关推荐

0 条评论