This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / There is a table (EMP) of employee's infromation,how to display all employees from the EMP table hired between July and December?
Thanks a lot!ENAME HIREDATE SAL
king 17-NOV-81 2000
blake 16-dec-81 3000
ward 30-aug-82 4000
-susana(susan);
2002-2-15
{126}
(#370121@0)
-
what DBMS are you using?
-kiwi(kiwi);
2002-2-15
(#370132@0)
-
oh,sql
-susana(susan);
2002-2-15
(#370254@0)
-
和我的名字很象.
-sq1(sq1);
2002-2-15
(#370265@0)
-
这真是一个奇怪的问题,但我想你可以把日期转化成字符串,然后用字符串做比较
-miketany(MIKE老狼);
2002-2-15
(#370286@0)
-
select * from tablename where hiredate>='7/1/1981' and hiredate<'10/1/1982'
-nice2002(nice2002);
2002-2-16
(#370855@0)
-
他又没说是哪一年, 只是说是七月到十二月
-miketany(MIKE老狼);
2002-2-16
(#370879@0)
-
你可以取日期中的月份做条件,类似:
Select * from employee where month(birthdate) between 9 and 10
好象在Oracle里是这样的,具体语法你再查一下
-hugefox(hugefox);
2002-2-17
(#371418@0)