数据库表数据插入
来源:23-1 课程总结

wake_
2024-07-04
train_business> insert into train_business.train_seat (id, train_code, carriage_index, row, col, seat_type, carriage_seat_index, create_time, update_time) values (1765001223121014784, 'G2', 1, '01', 'A', '1', 1, '2024-03-05 21:07:38.263', '2024-03-05 21:07:38.263')
[2024-07-04 20:24:52] [42000][1064] 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 'row, col, seat_type, carriage_seat_index, create_time, update_time) values (1765' at line 1
在插入business表数据的过程中报错,表的结构我已经按照sql语句成功创建。执行station和train.sql的插入语句也成功,但是在执行carriage和train_station以及seat表的插入语句时报错,望解答,感谢老师!
写回答
1回答
-
wake_
提问者
2024-07-04
【已解决】用`index`替换数据库保留字index及row、col
00
相似问题