CWIVE
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Lab10 hints

3 posters

向下

Lab10 hints Empty 回復: Lab10 hints

發表  軒仔 周一 11月 10, 2008 1:42 am

多幾個不同方法,抄起來不會太覺眼 tongue

Hints:
Q1 (不用喇掛...)

Q2 WHERE hiredate BETWEEN add_months(sysdate,-360) and sysdate

Q3 SELECT ename,dname, (months_between(sysdate, hiredate)/12) hiredate FROM emp

Q4 WHERE TO_NUMBER(TO_CHAR(hiredate,'DD'))<16

Q5 SELECT ename,dname FROM emp NATURAL JOIN dept WHERE ename LIKE 'A%'

Q6 (覺得自己有o的取巧所以不post出來了)


軒仔 在 周一 11月 10, 2008 1:46 am 作了第 1 次修改

軒仔

文章數 : 28
注冊日期 : 2008-03-29
來自 : Class B

回頂端 向下

Lab10 hints Empty 回復: Lab10 hints

發表  ada 周一 11月 10, 2008 1:29 am

kuen 寫到:don't copy all , that is not answer as well

Q1
select ename, sal from emp where sal between 2000 and 3000

Q2
select ename,sal,hiredate, to_char(months_between(sysdate,hiredate)) from emp

Q3
select ename, to_char(months_between(sysdate, hiredate)/12) from emp

Q4
Select ename from emp where to_char(hiredate, 'dd') between 1 and 16

Q5
select ename from emp where ename like 'A%'

Q6
select job, ename, deptno, dname from dept natural join salgrade natural join emp where sal
between losal and hisal and grade = 3

THANKS A LOTS KUEN KUEN,, AS PER YOUR HINTS, FINALLY I COMPLETED LAB 10 LA cheer
ada
ada

文章數 : 135
注冊日期 : 2008-03-28
來自 : CLASS A

回頂端 向下

Lab10 hints Empty Lab10 hints

發表  kuen 周日 11月 09, 2008 11:59 pm

don't copy all , that is not answer as well

Q1
select ename, sal from emp where sal between 2000 and 3000

Q2
select ename,sal,hiredate, to_char(months_between(sysdate,hiredate)) from emp

Q3
select ename, to_char(months_between(sysdate, hiredate)/12) from emp

Q4
Select ename from emp where to_char(hiredate, 'dd') between 1 and 16

Q5
select ename from emp where ename like 'A%'

Q6
select job, ename, deptno, dname from dept natural join salgrade natural join emp where sal
between losal and hisal and grade = 3

kuen

文章數 : 2
注冊日期 : 2008-03-28

回頂端 向下

回頂端


 
這個論壇的權限:
無法 在這個版面回復文章