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 'order(orderNum,totalprice,userId,addressId,createtime,status) VALUES('213312213' at line 1
时间: 2023-07-17 08:59:57 浏览: 148
SQL 错误提示
This error message indicates that there is a syntax error in your SQL query. Specifically, it suggests that there is an issue near the word "order." "Order" is a reserved keyword in SQL, so you cannot use it directly as a table or column name without escaping it.
To fix this error, you can use backticks (`) to escape the reserved keyword "order". Here's an example:
```sql
INSERT INTO `order` (orderNum, totalprice, userId, addressId, createtime, status)
VALUES ('213312213', 100.00, 1, 1, '2022-01-01', 'pending');
```
Make sure to substitute the appropriate values for the other columns in your query.
阅读全文