【正文】
(39。 n_ls number:=0。 ELSE for i in 1 .. n loop fetch c1 into v_ename,v_sal。 n_total number:=0。 update emp set m=v_m where empno=v_empno。 SELECT * FROM MESSAGES。||V_LOC )。||39。 39。 DEPTNO 39。191。 select * from department。 5 select * from user_objects where object_name in(39。 9 mit。id_num,39。amp。 1(4) Insert into MY_EMPLOYEE(id,last_name,first_name,userid,salary) Values (2,39。start_date39。 2 select job,round(max(sal),1) as maximum,round(min(sal),1) as minimum, round(sum(sal),1) as sam,round(avg(sal),1) as average from emp group by job。 ? 實驗內(nèi)容 (滿分最高 10分 )(到書上抄題 ) 1. P29 實驗內(nèi)容中的 (1)~(4)題 2. P49 實驗步驟中的 (1)~(2) ? p29 ? 1 ? SELECT ename,sal FROM emp ? WHERE sal2850。 ? 2 ? SELECT ename,sal FROM emp ? WHERE sal not BETWEEN 1500 AND 2850。 3 select as name, as loc,count(*) as number of people,round(avg(sal),1) as salary from dept d,emp e where = group by ,。 and 39。Dance39。userid39。amp。 實驗 7:表的創(chuàng)建和維護 ? 實驗?zāi)康? 1. 掌握表的創(chuàng)建、修改、刪除與更名 ? 實驗內(nèi)容( P132)(滿分最高 10分) 1. 實驗步驟中的( 1) ~( 8) ? 1 CREATE TABLE department (id number(7), name varchar2(25))。EMPLOYEE39。 insert into department values (,39。195。||39。||V_DNAME || 39。 LOC 39。 END。 2 declare v_empno %type。 end if。 CURSOR c1 is select ename,sal from emp order by sal desc。 insert into top_dogs values(v_ename,v_sal)。 cursor c1 is select ename,sal from emp order by sal desc。sal is 39。||v_ename)。 n_rs number:=0。)。 v_sal %type。 else v_m:=0。 END。 39。 DNAME 39。||V_DEPTNO || 39。 (39。178。 3 create table department (id number(7),name varchar2(5))。 3 ALTER TABLE EMPLOYEE ADD constraint EMPLOYEE_DEPT_ID_FK foreign KEY (dept_id) REFERENCES DEPARTMENT(ID) 4 select constraint_name,constraint_type from user_constraintS。 8 Rollback to a1。 5 Insert into MY_EMPLOYEE(id,last_name,first_name,userid,salary) Values(amp。,39。,795)。amp。 實驗 4:組函數(shù)、分組統(tǒng)計及子查詢 ? 實驗?zāi)康模? 1. 掌握組函數(shù)及 GROUP BY子句的用法; 2. 掌握單行和多行子查詢的用法; 3. 掌握在子查詢中使用組函數(shù); ? 實驗內(nèi)容( P78, P91)(滿分最高 10分 )(到書上抄題 ) 1. P78,實驗步驟中( 1) ~( 3) 2. P91,實驗步驟中( 1) ~( 3) 1 select roun