Mysql HQL查询不同的列
我正在查询表Airport中名称为“term%”的行,并按名称排序。它看起来像这样,而且工作正常:Mysql HQL查询不同的列,mysql,sql,hql,Mysql,Sql,Hql,我正在查询表Airport中名称为“term%”的行,并按名称排序。它看起来像这样,而且工作正常: from Airport where name like 'term%' order by name 现在,我想在同一个查询中的city列中查找“term%”,但我无法让它工作。 我想要这样的东西,但这不对: from Airport where name like 'term%' or where city like 'term%' order by named 您应该只有一个,其中: f
from Airport where name like 'term%' order by name
现在,我想在同一个查询中的city列中查找“term%”,但我无法让它工作。
我想要这样的东西,但这不对:
from Airport where name like 'term%' or where city like 'term%' order by named
您应该只有一个
,其中
:
from Airport where name like 'term%' or city like 'term%' order by name
查询应该是
from Airport where name like 'term%' or city like 'term%' order by name
而不是
from Airport where name like 'term%' or where city like 'term%' order by named
只使用一个where
子句及其name
notnamed