Beruflich Dokumente
Kultur Dokumente
:new and :old cannot be used with statement level triggers in Oracle
a)True**
b)False
c)NA
d)NA
2. Whenever user issues insert, update or delete statement on the table Oracle implicitly locks
the table in
a)Row share mode
b)Row Exclusive mode**
c)share row exclusive mode
d)No lock occurs implicitly.
7. PGA is created
a) whenever Oracle instance is created
b) whenever a user is connected to the oracle database
c) at the mount stage of oracle database
d) none of the above
8. Each user has a separate SGA in the Oracle Server.
a)TRUE
b)FALSE
c)NA
d)NA
9. if checkpoint is not enabled which of the following process does the job of a checkpoint.
a)DBWR
b)LGWR
c)SMON
d)PMON
10. I want to store Employee number , Employee Photograph and Employee description (having data
in MB's) in a table. Which of the following description is invalid
a)empno number(4),Photo LONG RAW, emp_descri CLOB
b)empno number(4),Photo LONG RAW, emp_descri LONG
c)empno number(4),Photo BLOB, emp_descri CLOB
d)empno number(4),Photo BLOB, emp_descri LONG
13. Following is the sequence of queries executed via SQL PLUS on an ORACLE 8i database.
(i) SET AUTOCOMMIT OFF;
(ii) CREATE TABLE COUNTS (COL1 NUMBER);
(iii) INSERT INTO COUNTS VALUES (5);
(iv) ALTER TABLE COUNTS ADD (COL2 NUMBER);
(v) ROLLBACK;
(vi) COMMIT;
After executing the above statements in order, which of the following statement is true
a) After step (vi), the table COUNTS will have only COL1 and the value will be NULL
b) After step (vi), the table COUNTS will have only COL1 and the value will be 5
c) After step (vi), the table COUNTS will have NULL in both COL1 and COL2
d) After step (vi), the table COUNTS will have value ‘5’ in COL1 and NULL in COL2
15. Which one of the below list is not a SQL *plus command
a) SPOOL
b) STOP**
c) EXIT
d) SAVE
16. Which of the following statement is false
a) CLOB **
b) BLOB
c) BFILE
a) 6 7 8
b) 8 7 6
c) 1 2 3
d) 3 2 1 **
19. Maximum what size of binary data can be stored in BLOB datatype?
a) 1 GB
b) 2 MB
c) 4 MB
d) 4 GB **
20. The memory structure that does not constitute the ORACLE instance is
a) System global Area
b) Dictionary Cache
c) Redo Log Buffer
d) None Of these **
21. Primary key is implicitly indexed
a) TRUE **
b) FALSE
c) NA
d) NA
22. Indexing
a) Speedens Inserts
b) Speedens updates
c) Reduces space requirements
d) Increases space requirements **
23. PGA is created
a) whenever Oracle instance is created
b) whenever a user is connected to the oracle database
c) at the mount stage of oracle database
d) none of the above
24. if checkpoint is not enabled which of the following process does the job of a checkpoint.
a) DBWR
b) LGWR **
c) SMON
d) PMON
25. Which of the following statement is true?
a) An extent consists of contiguous data blocks
b) A segment may not consist of contiguous data blocks.
c) A data block is the smallest unit of I/O used by the database.
d) All of the above **
29. When one user is waiting for data locked by another user,
the situation is known as ___________.
a) dirty read
b) phantom record
c) deadlock **
d) None of the above
30. The memory structure that does not constitute the ORACLE instance is
a) Database Buffer Cache
b) Dictionary Cache
c) Redo Log Buffer
d) None of the above **
33. An object table is a special kind of table that holds objects and provides a relational view
of the attributes of those objects
a) True **
b) False
c) Not Applicable
d) Not Applicable
34. Which Static data dictionary view describes the columns of tables, views and clusters owned
by the current user?
a) COLS
b) USER_COLL_TYPES
c) USER_CONS_COLUMNS
d) USER_IND_COLUMNS
35. How do you drop a user (say Anil) from the database with all the objects/resources owned by
him?
a) DROP USER ANIL
b) DROP USER ANIL CASCADE
c) First drop all the objects/resources individually owned by ANIL and then use ‘DROP USER
ANIL’
d) Both options (b) and (c) **
36. A Join condition involving an operator other than the equivalency is called
a) Non EquiJoin **
b) EquiJoin
c) OuterJoin
d) Inner Join
37. When an Oracle Database is started, memory is set aside and one or more processes are started
in that memory, and that memory is called as System Global Area(SGA)
a) True **
b) False
c) Not Applicable
d) Not Applicable
40. When a transaction reads an uncommitted data of other transaction, this will lead to
a) Phantom read
b) Dirty read **
c) Lost update
d) None of the above
41. A foreign key whose values are required to match the values of candidate key in the same
table are called
a) composite keys
b) self referencing keys **
c) overlapping keys
d) none of the above
42. Choose the correct answers to SELECT the list of values in column COL1 from 1 to 3 from a
table X ( the table contains values like 1.2,2.3 etc.)
a) select COL1 from X where COL1 between 1 and 3 **
b) select COL1 from X where COL1 > 1 and COL1 < 3
c) select COL1 from X where COL1 in (1,2,3)
d) select COL1 from X where COL1 not <= 1 and not >= 3
43. :new and :old cannot be used with statement level triggers in Oracle
a)True **
b)False
c)NA
d)NA
44. Whenever user issues insert,update or delete statement on the table Oracle implicitly locks
the table in
a)Row share mode
b)Row Exclusive mode **
c)share row exclusive mode
d)No lock occurs implicitly.
45.In Oracle One control file is associated with only one database.
a)true **
b)false
c)NA
d)NA
46. Which of the following situation in a PL/SQL block leads to too_many_rows exception.
a)When any of the DML statement fetches more than one row from the table
b) when select statement fetches more than one row from the table **
c) when select statement fetches more than one row from the table or cannot fetch any row from
the table.
d) a and c
47. Unique Index is implicitly created by oracle
a)whenever primary key constraint is imposed on a table column. **
b)whenever unique key constraint is imposed on a table column.
c)both a) and b)
d)Oracle does not create unique index implicitly.
51. Indexing
a)Speedens Inserts
b)Speedens updates
c)Reduces space requirements
d)Increases space requirements **
52. Can the function MAX be used on columns having DataType as Char?
a)TRUE **
b)FALSE
c)NA
d)NA
53. Assume you have a Database Table, which is used for storing historical Data. This table most
of the time is used for reading data from it and generating reports. Will higher level of
Normalization ( > 2 NF) would necessarily lead to better retrival of the data contained in the
table?
a)YES
b)No **
c)Not a valid option
d)Not a valid option
61. A view gets updated automatically when a table gets updated in Oracle.
a) True **
b) False
c) Ignore this option
d) Ignore this option
62. A table can contain more than one column having LONG data type
a) True
b) False **
c) Ignore this option
d) Ignore this option
63. The database object that is used to provide improved performance in the retrieval of rows
from a table is
a) Synonym
b) Index **
c) Sequence
d) Trigger
64. If there is no exception handler for the raised exception in the current block then
1]The exception propagates to the enclosing block
2]If there is no enclosing block then it propagates to the environment
from where the PL/SQL block is invoked
a) only 1 is true
b) only 2 is true
c) both 1 & 2 are true **
d) both 1 & 2 are false
65. Consider the following PL/SQL block of code:
DECLARE
ex1 EXCEPTION;
...
BEGIN
...
DECLARE
...
...
BEGIN
...
RAISE ex1;
...
EXCEPTION
WHEN ex1 THEN
...
END;
...
...
EXCEPTION
...
...
END;
Supposed ex1 is raised, and handled. Then,
a) Execution will resume in the inner block from the statement after the error-causing statement
b) Execution will resume from the next executable statement after the end of the inner block **
c) The entire program execution will terminate
d) Control is transferred to the exception section of the enclosing outer block
66. declare
v_result boolean;
begin
delete from sales where sales_id in(15,25,35);
v_result:=SQL%ISOPEN;
commit;
end;
what will be the the value of v_result if 3 rows are deleted ?
a) 0
b) 3
c) true
d) false **
67. Consider the following situation:
Transaction1 has UPDATED row1 of table1 but has not committed as yet
Transaction 2 wants to read(SELECT) the same row
Which of the following statements is correct:
a) Transaction 2 will be asked to wait till Transaction 1 releases the lock on row1
b) Transaction 2 will be given an implicit Shared lock before it could SELECT row1
c) Transaction 2 will be allowed to SELECT row1 reflecting values which is a result of the
current update done by Transaction 1
d) Transaction 2 will be allowed to SELECT row1 reflecting values which is a
result of some previous committed Transaction from the rollback segment. **
68. The data dictionary view which maintains the constraints imposed on the objects created
by a user:
a) constraints_users
b) constraint_name
c) users_constraint
d) user_constraints **
70. With respect to execution of the DDL commands in PL/SQL, which one of the following is true?
a) You can execute DDL with EXECUTE IMMEDIATE syntax **
b) You can execute DDL with EXECUTE DDL syntax
c) You can execute DDL with DYNAMIC EXECUTE syntax
d) You cannot use DDL in PL/SQL
71. Assume that there is a table called EMP with following columns - EMPNO, ENAME, ESAL
without any primary key. What will be output if we execute the following SQL statement 5
times-
Insert into EMP(EMPNO,ENAME,ESAL) values (NULL, NULL)
a) The Query will return an error and won’t execute
b) Only 1 record will be inserted with NULL stored in all the columns
c) Only 1 record is created and the system assigns some unique value to the EMPNO column
automatically
d) None of the above
72. Indexing is needed for
a) Faster insertion of data
b) Faster updation of data
c) Faster retrieval of data **
d) Both a & b
73.Consider the statements below
I] IMS conforms to the Hierarchical model
II] IDMS confirms to Network model
III] DB2 confirms to Relational Model
a) Only III is true
b) Only I and III are true
c) Only II and III are true
d) I, II,III are true **
74. All candidate keys except primary key are foreign keys
a) True
b) False
c) May be true in some cases **
d) May be true if primary key is a composite key
79. The correct way to get the next value of a sequence into a PL/SQL variable (assuming the
sequence is already created) is
a) iTest := seqTest.NEXTVAL
b) SELECT seqTest.NEXTVAL INTO iTest FROM DUAL **
c) both (a) and (b)
d) iTest := seqTest.CURRVAL
80. In the PL/SQL block given below, how many times will the loop be executed ?
BEGIN
FOR i in 1..50
LOOP
i:=i+1;
DBMS_OUTPUT.PUT_LINE(' Value of i is ' || i);
END LOOP;
END;
a) 10 times
b) 25 times
c) Once
d) There is an error in the code
81. Choose the correct answer with respect to the statements given below
I] Functions cannot have out parameter as they already have a return type
II] Functions cannot return more than one value by any means
a) Only I is true
b) Both are false **
c) only II is true
d) Both are true
82. What will the following statement do?
PRAGMA EXECEPTION_INIT(EX1,-20000)
83. To increase the size of the database, the following can be done
84. Choose the correct answer with respect to the statements given below
a) only II is true
b) I and II is true
c) only II and III are false
d) all the statements are false
a) true
b) false----
c) ignore
d) ignore
86. Only implicit cursors can take arguments while declaring them
a) true
b) false-----
c) ignore
d) ignore
87. Which of the following statements is true?
a) SELECT ... FROM ... WHERE ... GROUP BY ... HAVING ...ORDER BY---
b) SELECT ... FROM ... WHERE ... GROUP BY ... ORDER BY ... HAVING
c) SELECT ... FROM ... WHERE ... ORDER BY ... HAVING ...
d) All of these
a) SQL Command
b) SQL*Plus Command----
c) PL/SQL Statement
d) Ignore this option
90. A minimum 4 redo log files are required for an Oracle database
a) True
b) False--
c) Ignore this option
d) Ignore this option
a) True--
b) False
c) Ignore this option
d) Ignore this option
a) Redo log----
b) All Tables
c) Parameter file
d) All of the above
93. Which of the following is true?
a) CLOB
b) LONG
c) VARCHAR2
d) All of the above-----
95. Consider:
CREATE TABLE t1 (
n NUMBER,
name VARCHAR2(20) CONSTRAINT c1 CHECK (name = UPPER(name))
);
a) The INSERT will happen. The INSERT converts Mary to upper case and stores
b) The INSERT will fail due to constraint violation.------
c) The INSERT will happen, but conversion of Mary will not happen.
d) Ignore this option.
96. In Oracle, which operator is used to access the object referenced by a ref column?
a) VALUE
b) REF
c) DEREF-----
d) None of the above
97. Consider two tables: Students(rollnum, name, age, sex) and MarksTab(rollnum, subject, marks).
What is the problem with the following query:
SELECT name, rollnum, subject, marks FROM Students, MarksTab WHERE Students.rollnum =
MarksTab.rollnum;
a) In a stored procedure
b) In a stored function
c) In a package
d) All of the above----
EMPNO SAL
----- ----------
10 1000
20 1200
30 1400
40 2000
DECLARE
kount NUMBER;
x NUMBER;
BEGIN
UPDATE empLOYEES SET sal=sal+100;
SELECT COUNT(*) INTO kount FROM empLOYEES;
x := SQL%ROWCOUNT;
DBMS_OUTPUT.PUT_LINE('x='||x);
END;
a) 4
b) 1--
c) 0
d) SQL is undefined, so the PL/SQL code will not execute
100. A stored function in PL/SQL need not always have a RETURN statement
a) True
b) False----
c) Ignore this option
d) Ignore this option
-------------------------------------------------------------------------------------------------
1. The function that can be used to get the Oracle error code in PL/SQL is
a) PRAGMA EXCEPTION_INIT
b) GET_ERRORCODE
c) SQLCODE*
d) ORACLE_EXCEPTION
2. Consider the table emp(empno, name, emptype). The emptype column is a char field storing either
'T' or 'P'. ______________ is used in a query to give the output as 'Temporary' if the value is 'T' in
table and 'Permanent' if the value in the table is 'P'.
a) NVL
b) TO_CHAR
c) DECODE------*
d) CONVERT
3. Consider the query "Select eno, ename from EMP where ename= null",
what will be data fetched?
a) 1, null
b) no rows fetched----*
c) 1,"TOM"
d) null, null
a) 100 rows
b) 100000 rows
c) Would give the error - " Single row subquery returns more than one row"------* -
d) None of the above-
5. Oracle always opens a cursor to execute any select statement
a) TRUE-----------*
b) FALSE
c) NA
d) NA
9. Which of the following convert the sqlj file to java class file
a) sqlj runtime
b) sqlj translator=====*
c) loadjava utility
d) none of the above
13. Which of the following data types in Oracle can be used to store
graphics in the database.
a) raw
b) long raw
c) blob
d) all the above-----
15. Assume a DB Table for maintaining Employee information with Employee Id as the primary
key. Which of these queries will run faster?
Query1 Select * from TBL_EMPLOYEE Where employee_name like '%xyz%' and employee_id >
10000;
Query2 Select * from TBL_EMPLOYEE Where employee_id > 10000 and employee_name like
'%xyz%'
a) Query1
b) Query 2**
c) Both will be equally faster
d) Depends on the indices that are created on this table.
16. What does sysdate - <Any other date in proper date format> give as output
a) Hours between the two
b) Days between the two----
c) Month between the two
d) Year between the two
17. Maximum what size of binary data can be stored in BLOB datatype?
a)1 GB
b)2 MB (CLOB 2GB)
c)4 MB
d)4 GB--------
18. Can the function MAX be used on columns having DataType as Char?
a)TRUE---
b)FALSE
c)NA
d)NA
19. Indexing
a)Speedens Inserts
b)Speedens updates
c)Reduces space requirements
d)Increases space requirements -----
21. The memory structure that does not constitute the ORACLE instance is
a)System global Area
b)Dictionary Cache
c)Redo Log Buffer
d)None Of these Option -----
24. A table can contain more than one column having long data type
a)TRUE
b)FALSE--
c)NA
d)NA
26. In Oracle One control file is associated with only one database .
a)true------
b)false
c)NA
d)NA
27. In Oracle which one of the following information is not stored in control file.
a)database name
b)current log sequence number
c)checkpoint information
d)parameter file name------
32. OTHERS Exception handler must be last among the exception handlers of a block
a)true*
b)false
c)NA
d)NA
34. All the rows of a nested table are stored in a single table.
a)true
b)false*
c)NA
d)NA
37. To transfer the data stored in a text file into Oracle Database which of the
following utility is used.
a)import
b)export
c)sql*loader
d) both a) and c) are correct--**