分享
 
 
 

1z0-001Braindump2002.02.16

王朝other·作者佚名  2008-05-19
窄屏简体版  字體: |||超大  

1. SCOTT FORGOT HIS PASSWORD WHILE ON VACATION WHICH COMMAND MUST BE EXECUTED TO SET A PASSWORD FOR SCOTT

A. DBA MUST EXECUTE THE COMMAND ALTER USER SCOTT IDENTIFIED BY LION

2. YOU ARE UPDATING THE EMPLOYEE TABLE JANE HAS BEEN GRANTED THE SAME PRIVILAGES AS YOU ON THE EMPLOYEE TABLE YOU ASK JANE TO LOG ON TO THE DATABASE TO CHECK YOUR WORD BEFORE YOU ISSUE THE COMMIT COMMAND WHAT CAN SHE DO TO THE EMPLOYEE TABLE

A. JANE CAN ACCESS THE TABLE BUT SHE CAN NOT SEE YOU CHANGES AND CAN NOT MAKE THE CHANGES TO THE ROLES THAT YOU ARE CHANGING

3. EXAMINE THE STRUCTURE OF THE STUDENT TABLE

NAME NULL TYPE

STUD_ID NOT NULL NUMBER(3)

NAME NOT NULL VARCHAR2(25)

ADDRESS VARCHAR2(50)

GRADUATION DATE

WHICH STATEMENT INSERT A NEW ROW INTO THE STUDENT TABLE ?

A. INSERT INTO STUDENT (STUD_ID, ADDRESS, NAME, GRADUATION) VALUES (101,?00 MAIN STREET? ?MITH? ?7-JAN-00?;

4. EXAMINE THE STRURE OF THE STUDENT TABLE

GRADUATION COLUMN IS A FORIGN KEY COLUMN TO THE GRADUATE TABLE EXAMINE THE DATA IN THE GRAD_DATE_TABLE

GRADUATION 20-JAN-1999

12-MAY-1991

19-JAN-2000

25-JAN-2000

13-JAN-2001

29-JAN-2001

WHICH UPDATE STATEMENT PRODUCES THE FOLLOWING ERROR

ORA-02291 INTEGRITY CONSTRAINT (SYS-C-23) VIOLDATED PARENT

KEY NOT FOUND

A. UPDATE STUDENT SET NAME = ?MITH? GRADUATION = ?5-AUG-2000?

WHERE STUD-ID = 101

5. THE VIEW EMP-VIEW IS CREATED BASED ON THE EMP TABLE AS FOLLOWS

CREATE OF REPLACE VIEW EMP_VIEW AS

SELECT DEPTNO, SUM(SAL) TOT_SAL, COUNT(*) NOT_EMP FROM EMP

GROUP BY DEPTNO;

WHAT HAPPENS WHEN THIS COMMAND IS USED ?

UPDATE EMP_VIEW SET TOT_SAL = 20000 WHERE DEPTNO = 10;

ANS THE BASE TABLE CANNOT BE UPDATED THROUGH THIS VIEW

6. YOU HAVE A VIEW CALLED ANN_SAL THAT IS BASED ON THE EMPLOYEE TABLE STRUCTURE ON THE ANN-SAL VIEW IS

NAME NULL TYPE

EMPNO NOTNULL NUMBER(4)

YEARLY_SAL NUMBER(9,2)

MONTHL_SAL NUMBER(9,2)

WHICH STATEMENT RETRIVES ALL DATA FROM ANN_SAL VIEW ?

ANS. SELECT * FROM ANN_SAL;

7. EVALUATE THIS IF STATEMENT

IF V_VALUE 100 THEN

V_NEW_VALUE := 2 * V_VALUE

ELSEIF V_VALUE 200 THEN

V_NEW_VALUE := 3 * V_VALUE

ELSEIF V_VALUE 300 THEN

V_NEW_VALUE := 4 * V_VALUE

ELSE

V_NEW_VALUE := 4 * V_VALUE

ENDIF;

WHAT VALUE BE ASSIGNED TO V_NEW_VALUE IF V_VALUE = 250:

ANS: 500

8. THE PLAYER TABLE CONTAINTS THESE COLUMNS

ID NUMBER(9)

NAME VARCHAR(2)

MANAGERID NUMBER(9)

IN THIS INSTANCE MANAGER ARE PLAYER AND YOU NEED TO DISPLAY A LIST OF PLAYERS EVALUATE THESE SQL STATEMENT

SELECT P.NAME,M.NAME FROM PLAYER P, PLAYER M

WHERE M.ID = P.MANAGERID;

SELECT P.NAME,M.NAME FROM PLAYER P, PLAYER M

WHERE M.MANAGERID = P.ID

HOW WOULD THE RESULT DIFFER

ANS: THE RESULT WILL BE SAME BUT DISPLAY WILL BE DIFFERENT.

9. HOW WOULD YOU DECLARE A PLSQL TABLE OF RECORDS TO HOLD THE ROWS SELECTED FROM THE EMP TABLE?

DECLARE

TYPE EMP_TABLE IS TABLE OF EMP%ROWTYPE

INDEX BY BINARY INTEGER E

EMP_TABLE EMP_TABLE_TYPE;

YOU WANT TO CREATE A CURSOR THAT CAN BE USED SEVERAL TIMES IN A BLOCK. SELECTING A DIFFERENT ACTIVE SET EACH TIME THAT IT IS OPENED WHICH TYPE OF CURSOR DO YOU CREATE

ANS: A CURSOR THAT USE PARAMETERS

10. WHICH STATEMENT IS TRUE WHEN WRITING A CURSOR FOR LOOP ?

ANS: YOU DO NOT EXPLICITY OPEN, FETCH OR CLOSE A CURSOR WITHIN A CURSOR FOR LOOP.

11. THE STRUCTURE OF THE DEPT TABLE

NAME NULL TYPE

DEPTNO NOTNULL NUMBER(25)

DNAME VARCHAR2(14)

LOC VARCHAR2(5)

EXAMINE THE CODE

DECLARE

DEPT_REC DEPT%ROWTYPE

BEGIN

SELECT * INTO DEPT_REC FROM DEPT WHERE DEPTNO = 10;

END

WHICH PL/SQL STATEMENT DISPLAYS THE LOCATION OF SELECTED DEPARTMENT.

ANS: DBMS_OUTPUT.PUT_LINE(DEPT_REC_LOC);

12. WHICH STATEMENT ABOUT IMPLICT CURSOR IS TRUE ?

IMPLICT CURSORT ARE DECLARED IMPLICITY FOR ALL THE DML AND SELECT STATEMENTS

13. EVALUATE THIS PL/SQL BLOCK

DECLARE

V_RESULT NUMBER(2)

BEGIN

DELETE FROM EMPLOYEE WHERE DEP_ID IN(10,20,30);

V_RESULT:= SQL%ROWCOUNT;

COMMIT

END;

WHAT WILL BE THE VALUE OF V_RESULT IF NO ROWS ARE DELETED;

ANS: ZERO

14. WHICH TWO CONDITIONS IN A PL/SQL BLOCK CAUSE AN EXCEPTION ERROR TO OCCUR ? CHOOSE TWO

ANS: SELECT STATEMENT DOES NOT RETURN A ROW

SELECT STATEMENT RETURNS MORE THAN ONE ROW

15. YOU NEED TO CREATE A PL/SQL PROGRAME TO INSERT RECORD INTO EMPLOYEE TABLE WHICH BLCOK OF CODE SUCCESSFULLY USES THE INSERT COMMAND

ANS:

DECLARE

V_HIREDAT DATE:= SYSDATE;

BEGIN

INSERT INTO EMP (EMPNO,ENAME,HIREDATE)

VALUES (EMPNO_SEQUENCE.NEXTVAL,?NAME?V_HIREDATE,&DEPTNO);

END;

EVALUATE THIS PL/SQL BLOCK

16. EVALUATE THIS PL/SQL BLOCK

BEGIN

FOR I IN 1..10 LOOP

IF I=4 OR I=6 THEN NULL;

ELSE

INSERT INTO TEST(RESULT) VALUES(1);

END;

COMMIT;

END LOOP;

ROLL BACK;

END;

HOW MANY VALUES WILL BE INSERTED INTO THE TEST TABLE ?

ANS: 8

17. YOU ISSUE COMMAND

CREATE PUBLIC SYNONYM EMP FOR ED_EMPLOYEE

WHICH TASK HAS BEEN ACCOMPLISHED?

ANS: THE NEED TO QUALIFY THE OBJECT VALUE WITH ITS SCHEME IS ELIMINATED FOR ALL USERS

18. IN WHICH ORDER DOES THE ORACLE SERVER EVALUATE CLAUSES?

WHERE, GROUP BY, HAVING

19. YOU ATTEMPT TO QUERY TO THE DATABASE WITH COMMAND

SELELECT DEPT_NO, AVG(MONTHS_BETWEEN(SYSDATE,HIRE_DATE))

FROM EMPLOYEE

WHERE AVG(MONTHS_BETWEENS(SYSDATE,HIRE_DATE))60

GROUP BY DEPT_NO

ORDER BY AVG(MONTHS_BETWEEN(SYSDATE,HIRE)DATE)

WHY DOES THIS STATEMENT CAUSE AN ERROR ?

ANS: A WHERE CLAUSE CAN NOT BE USED TO RESTRICT GRUPS.

20. THE PATH TABLE CONTAINS THESE COLUMNS

ID NUMBER(7) PK

COST NUMBER(7,2)

PRODUCT_ID NUMBER(7)

EVALUATE THESE SQL STATEMENT

SELECT ROUND(MAX(COST),2),

ROUND(MIN(COST),2),

ROUND(SUM(COST),2),

ROUND(AVG(COST),2) FROM PART;

SELECT PRODUCT_ID,ROUND(MAX(COST),2),

ROUND(MIN(COST),2),

ROUND(SUM(COST),2),

ROUND(AVG(COST),2) FROM PART

GROUP BY PRODUCT_ID;

HOW WILL THE RESULT DIFFER

ANS: STATEMENT 1 WILL ONLY DISPLAY ONE ROW OF RESULTS

STATEMENT CAN DISPLAY MORE THAN ONE.

21. IN WHICH SELECTION OF A PL/SQL BLOCK IS A USER DEFINED EXCEPTION RAISED?

EXECUTABLE

22. EXAMINE THE CODE

SET SERVER OUTPUT ON

DECLARE

V_CHAR_VAL VARCHAR2(100);

BEGIN

V_CHAR_VAL := ?ELLO WORLD?

DBMS_OUTPUT.PUT_LINE (V_CHAR_VAL);

END

SET SERVER OUTPUT OFF

THIS CODE IS STORED IN A SCRIPT TITLE NAME ?YPROC.SQL?WHICH STATEMENT

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有