MySQL:SQL语法中的错误|限制0,25

时间:2016-03-04 14:44:02

标签: mysql

我不明白这个错误,伙计们请帮助我。为什么我收到此错误.. 我的查询中有什么问题吗?

这是错误..

  

#1064 - 您的SQL语法出错;检查与MySQL服务器版本对应的手册,以获得正确的语法   在第7行'LIMIT 0,25'附近

这是我的疑问:

SELECT
    equivalent
FROM
    tb_student_record
INNER JOIN
    tb_student ON tb_student_record.stud_id = tb_student.stud_id 
WHERE
    tb_student_record.instructor_id = 'INST-20131296' 
    AND tb_student_record.criteria_id = '1' 
    AND tb_student_record.class_record_id = '1' 
    AND (CONCAT(stud_fname, ' ', stud_lname) = 'Jeffrey Oliveras' 
    AND tb_student_record.term = 'Prelim'

2 个答案:

答案 0 :(得分:2)

您错过了concat功能

的关闭功能
SELECT equivalent FROM tb_student_record INNER JOIN tb_student ON tb_student_record.stud_id=tb_student.stud_id 
WHERE tb_student_record.instructor_id = 'INST-20131296' 
AND tb_student_record.criteria_id = '1' 
AND tb_student_record.class_record_id = '1' 
AND (CONCAT(stud_fname, ' ', stud_lname) = 'Jeffrey Oliveras' )
AND tb_student_record.term = 'Prelim'

答案 1 :(得分:1)

您的查询最终似乎有问题:

enter image description here