[英]mySQL query,what is wrong?
I've been asked to create a query for a database, the query is to create: A list of employees showing FirstName, LastName, Email, and Grade (textual title) where they have a skill containing the word 'video' (one entry per employee only even if employees have multiple video skills) 我被要求为数据库创建查询,该查询将创建:显示名字,姓氏,电子邮件和等级(文本标题)的员工列表,他们的技能中包含单词“视频”(一个条目)每个员工,即使员工具有多种视频技能也是如此)
So far I've done this: 到目前为止,我已经做到了:
SELECT Employee.FirstName, Employee.LastName, Employee.Email, Grade.Title,
FROM Employee INNER JOIN
Grade
ON Grade.GradeID = Employee.GradeID INNER JOIN
EmployeeSkill
ON EmployeeSkill.EmployeeID = Employee.EmployeeID INNER JOIN
Skill
ON Skill.SkillID = EmployeeSkill.SkillID
WHERE Skill.Title LIKE "%video%"
However I keep getting a 1064 error and I'm not sure what I'm doing wrong please help. 但是,我一直收到1064错误,并且不确定自己在做什么错,请帮忙。
You have an extra comma in the SELECT section of your query 您的查询的SELECT部分中有一个多余的逗号
SELECT Employee.FirstName,
Employee.LastName,
Employee.Email,
Grade.Title, -- Remove the comma here
FROM Employee
INNER JOIN Grade
ON Grade.GradeID = Employee.GradeID
INNER JOIN EmployeeSkill
ON EmployeeSkill.EmployeeID = Employee.EmployeeID
INNER JOIN Skill
ON Skill.SkillID = EmployeeSkill.SkillID
WHERE Skill.Title LIKE "%video%"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.