×

Loading...

Topic

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
    • what DBMS are you using?
      • oh,sql
        • 和我的名字很象.
    • 这真是一个奇怪的问题,但我想你可以把日期转化成字符串,然后用字符串做比较
    • select * from tablename where hiredate>='7/1/1981' and hiredate<'10/1/1982'
      • 他又没说是哪一年, 只是说是七月到十二月
    • 你可以取日期中的月份做条件,类似: Select * from employee where month(birthdate) between 9 and 10 好象在Oracle里是这样的,具体语法你再查一下