2017-06-01 78 views
-2

运行代码时我收到缺少表达

select * from medication 
where MEDICINE like '%injection' 
and where visit date between '01-May-2004' and between '31-May-2004'; 
+5

更改'和哪里'到'和'。也修正'访问日期',无论是应该的。 –

+0

每个SELECT只有一个WHERE。 – jarlh

+0

现在返回错误ORA-00920:无效的关系运算符 – CWilson

回答

1

评论都拿到来详细的错误缺少表达:容易只是显示更改和解释。

SELECT * 
FROM medication 
WHERE MEDICINE like '%injection' 
    and visit_date between '01-May-2004' and '31-May-2004'; 
  • 没有第二个地方...
  • 访问日期间​​没有第二个需要在“”如果有一个空间,具体情况然后。或者使用在Oracle中流行的_,但它确实取决于列的名称。