Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
#1064-您的SQL语法有错误;查看与您的MySQL服务器版本对应的手册,了解要使用的正确语法_Sql_Phpmyadmin - Fatal编程技术网

#1064-您的SQL语法有错误;查看与您的MySQL服务器版本对应的手册,了解要使用的正确语法

#1064-您的SQL语法有错误;查看与您的MySQL服务器版本对应的手册,了解要使用的正确语法,sql,phpmyadmin,Sql,Phpmyadmin,当我启动这个查询时,它显示了这个错误 SELECT student.studnt_id,student_onfo.student_name,subject,marks FROM `student` INNER JOIN 'student_info' ON student.studnt_id=student_info.studnt_id ORDER BY student.studnt_id 试试这个查询 这里有拼写错误:- 学生信息.学生姓名->学生信息.学生姓名 'student\u

当我启动这个查询时,它显示了这个错误

SELECT student.studnt_id,student_onfo.student_name,subject,marks  
FROM `student` 
INNER JOIN 'student_info' ON student.studnt_id=student_info.studnt_id 
ORDER BY student.studnt_id
试试这个查询

这里有拼写错误:-

学生信息.学生姓名
->
学生信息.学生姓名

'student\u info'->
student\u info

试试这个-

SELECT student.studnt_id,student_info.student_name,subject,marks  
FROM `student` 
INNER JOIN `student_info` ON student.studnt_id=student_info.studnt_id 
ORDER BY student.studnt_id

student_onfo
似乎是错误的,您需要将表名换行:not single quotes@Pekka웃 这是一个非常愚蠢的问题标题——特别是因为MySQL中90%的错误都有这条消息。现在感谢它的工作技巧如果这个答案完全适合你,请批准它。
SELECT 
      s.studnt_id
    , si.student_name
    , subject
    , marks  
FROM student AS s
JOIN student_info AS si ON s.studnt_id = si.studnt_id 
ORDER BY s.studnt_id