eco*_*eco 11 mariadb spacebars
我在此数据库中有一个包含空格键的列,我想要更改.
ALTER TABLE . CHANGE COLUMN `Anzahl Personen` AnzahlPersonen int(11);
Run Code Online (Sandbox Code Playgroud)
在命令行中使用此行后,输出如下:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHANGE COLUMN `Anzahl Personen` AnzahlPersonen int(11)' at line 1
Run Code Online (Sandbox Code Playgroud)
是的,我不知道,我做错了什么.
tal*_*zin 17
如果您使用点(.)而不是表名,这就是您有错误的原因.您必须指定表名:
ALTER TABLE `table_name` CHANGE COLUMN `Anzahl Personen` AnzahlPersonen int(11);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11980 次 |
| 最近记录: |