报错提示为
select rank,name,price from
book
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 ',name,price frombook
’ at line 1
直接说我sql语句存在错误
1、表结构
2、报错
select rank,name,price from `book`
3、特殊字段加引号解决
select 'rank',name,price from `book`
4、其他
别名为rank也会报错比如
SELECT id,'rank_id' AS rank,name,author,publish,price,href,ISBN FROM book