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
热门推荐
10 儿子立冬祝福语简短独特
11 对当兵的祝福语简短
12 侄儿高考试祝福语简短
13 伴郎红包祝福语朋友简短
14 媳妇生日简短祝福语朋友
15 公司年会祝福语简短最好
16 元旦感恩祝福语简短大全
17 红包祝福语简短10字
18 周六早晨祝福语简短