我在将数据插入我的表“事件”时遇到了小问题
+-------+----------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+----------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| name | longtext | YES | | NULL | |
+-------+----------+------+-----+---------+----------------+
从我看来old_data:
+-------+------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+------+------+-----+---------+-------+
| event | text | YES | | NULL | |
+-------+------+------+-----+---------+-------+
我想将视图 old_data 中的字段“事件”中的数据插入到表“事件”中的“名称”字段中,我试图使用命令:
insert into 'events' ('name') select 'event' from 'old_data'
insert into 'events' ('name') select 'event' from 'old_data' group by 'event';
等等等等。每次都是语法错误。为什么?!