MySQL表名称中的下划线会引起问题吗?
不,MySQL表名中的下划线不会有任何问题。您将在MySQL表名称中出现破折号。
这是演示,使用表名的下划线没有任何问题-
_StudentTrackerDemo
让我们在创建表时看到相同的内容。创建表的查询如下-
mysql> create table _StudentTrackerDemo -> ( -> StudentId int, -> StudentFirstName varchar(100) -> );
下划线对表名有效,但连字符在某些MySQL版本中无效。这是带破折号的表名。同样会产生错误-
mysql> create table Student-table -> ( -> Id int, -> Name varchar(100) -> ); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-table (Id int, Name varchar(100) )' at line 1
热门推荐
1 带狗狗训练
4 听力训练狗狗
6 怎训练狗狗
7 腹肌训练狗狗
8 网球训练狗狗
9 记叙文训练狗狗
10 狗狗太凶怎么训练
11 核心力量训练狗狗
12 狗狗乱叫怎么训练
13 发音训练狗狗
14 怎么训练狗狗叼东西给主人
15 荆州训练狗狗
16 篮球训练狗狗
17 做训练狗狗
18 训练狗狗坐姿