10

我在这里做一个简单的查询,它返回“玛丽”列不存在:

SELECT  telephone.telephonenumber as tel
FROM    person, telephone
WHERE   person.idperson = telephone.idperson
AND person.personname = ‘Mary’;

有人可以解释会发生什么吗?我不希望 Mary 作为一列,而是作为一个值。

在此先感谢,加布里埃尔

4

2 回答 2

14
于 2012-11-02T13:52:25.707 回答
2

Make sure that you are quoting your string correctly.

From your snippet, I'd say that's the problem here since you're using something else than simple single quotes.

于 2012-11-02T13:53:17.860 回答