select * from emp limit (3-1)*4,4 > 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 '(3-1)*4,4' at line 1
时间: 2023-10-16 07:55:32 浏览: 28
这个错误是因为在 MySQL 中,LIMIT 子句的参数应该是两个整数,分别表示返回结果的偏移量和要返回的行数。在你的查询中,(3-1)*4 是一个表达式,而不是一个整数。
如果你想要查询结果的偏移量为 4,返回 4 行数据,你可以修改查询为:
SELECT * FROM emp LIMIT 4 OFFSET 4;
这样就可以正确执行查询了。
相关问题
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 'FROM * `EMP`' at line 1
The error message indicates that there is a syntax error in your SQL query. In this case, it seems that you are using the `FROM` keyword incorrectly. The correct syntax for a basic `SELECT` statement is:
```
SELECT column1, column2, ...
FROM table_name
```
Make sure you specify the table name after the `FROM` keyword, not an asterisk (*). It should be something like:
```
SELECT *
FROM EMP;
```
If you still encounter the error, please provide more information about your query or the table structure so that I can assist you further.
阅读全文
相关推荐













