Dynamic Insert

What is Dynamic Insert?

Questions by swapnabogolu

Showing Answers 1 - 3 of 3 Answers

mkm187

  • Oct 5th, 2010
 

INSERT FIRST

WHEN SAL > 25000 THEN

INTO special_sal VALUES(DEPTID, SAL)

WHEN HIREDATE like ('%00%') THEN

INTO hiredate_history_00 VALUES(DEPTID,HIREDATE)

WHEN HIREDATE like ('%99%') THEN

INTO hiredate_history_99 VALUES(DEPTID, HIREDATE)

ELSE

INTO hiredate_history VALUES(DEPTID, HIREDATE)

SELECT department_id DEPTID, SUM(salary) SAL,

MAX(hire_date) HIREDATE

FROM employees

GROUP BY department_id;

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions