由于某些原因,我的内部连接有问题,它根本就不能工作。
以下是我的代码
SELECT
`hold`.`id` AS `id`,
`hold`.`name` AS `name`
INNER JOIN `instruktorer`
ON `hold`.`ins` = `instruktorer`.`id`
FROM `hold`我得到的错误是:
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 'INNER JOIN `instruktorer` ON `hold`.`ins` = `instruktorer`.`id` FROM `hold`' at line 4我几乎每天都做一个内部连接,但是现在我就是不能让它工作。
希望有人能帮助我
发布于 2013-01-11 18:46:36
FROM必须在INNER JOIN之前。通常,所有查询都有一个定义的顺序。对于SELECT,它是这样的
select
from
join
where
group by
having
order by
limit发布于 2013-01-11 18:46:02
试试这个:
SELECT
`hold`.`id` AS `id`,
`hold`.`name` AS `name`
FROM `hold`
INNER JOIN `instruktorer`
ON `hold`.`ins` = `instruktorer`.`id`发布于 2013-01-11 18:52:53
https://stackoverflow.com/questions/14276454
复制相似问题