我有一张表有个字段名称是starttime 类型是DATE ,其中有一行的值是"11:00:00",我想把这一列选出来,语句如下: select * from routebanci where starttime='11:00:00' and routename='***',可是总是说:ORA-01843: not a valid month,网上看了也改动了一下参数 NLS_DATE_LANGUAGE=AMERICAN 和 NLS_DATE_FORMAT=YYYY-MM-DD,可是还是不行 请教一下什么原因,我这里没有年月日的,只要一个时间就可以了,表原来是SQL建立的,是导过来的,不知道有什么好的解决办法 ...starttime你不是说了是date类型吗 '11:00:00'是字符串,当然不匹配了 select * from routebanci where to_char(starttime,'hh24:mi:ss')='11:00:00' and routename='***' 试试 SQL code: select * from routebanci where substr(to_char(starttime,'yyyy-mm-dd hh24:mi:ss'),11,8) = '11:00:00'