我想知道在SELECT查询中是否可以在列之间使用OR运算?
select
first_name,
last_name
from
employee
where
(first_name OR last_name)='&enter_search_string';
答案 0 :(得分:4)
只是我的偏好:
SELECT first_name, last_name
FROM employee
WHERE '&enter_search_string' IN (first_name, last_name)
答案 1 :(得分:2)
您需要像这样使用它:
select
first_name,
last_name
from
employee
where first_name='first_name' OR last_name='last_name';