Академический Документы
Профессиональный Документы
Культура Документы
Q7> For which two constraints does the Oracle Server implicitly create a unique index?
(Choose two)
1>NOT NULL
2>PRIMARY KEY
3>FOREIGN KEY
4>CHECK
5>UNIQUE
---------------------------------------------------------------------------------------------------------Q8> Which clause allows the deletion of child records if the parent records are deleted
1>on delete cascade
2>drop constraint constraint_name cascade
3>cascade constraints
4>None of the above
---------------------------------------------------------------------------------------------------------Q9> Which of the following is not a conversion function
1>To_char
2>To_date
3>To_Initstring
4>To_number
---------------------------------------------------------------------------------------------------------Q10> SELECT id_number, (product_quantity+100*19-19-1) FROM Inventory; What is
evaluated 1st in the above query?
1>19-19
2>100*19
3>19-1
4>product_quantity+100
---------------------------------------------------------------------------------------------------------Q11> A primary key made up of more than one attribute is known as ___________ key
1>Foreign
2>Composite
3>Unique
4>Candidate
--------------------------------------------------------------------------------------------------------Q12> Which of the following is not a valid SQL command ?
1>select * from dual ;
2>set define empname
3>update emp set empno = 6543 where ename = 'SMITHERS';
4>create table employees (empid varchar2(10) primary key) ;
----------------------------------------------------------------------------------------------------------
Q13> You are setting up a join operation between tables EMPLOYEE and DEPT. There
are some employees in the EMPLOYEE table that you wants return by the query,but the
employees are not assigned to department yet. Which of the following
select statement is most appropriate?
1>select e.empid,d.dname from employee e,dept d where e.deptno=d.deptno (+);
2>select e.empid,d.dname from employee e,dept d where e.deptno=d.deptno ;
3>select e.empid,d.dname from employee e,dept d ;
4>select e.empid,d.dname from employee e, dept d where e.deptno (+)=d.deptno ;
---------------------------------------------------------------------------------------------------------Q14> Which of the following statement(s) are not true about order by clauses?
1>the ascending or descending order can be defined with the asc or desc keyword.
2>columns can be represented by numbers indicating their listed order in the
select clause with in order by
3>multiple columns can be used to define sort order in an order by clause.
4>only one column can be used to define the sort order in an order by clause
--------------------------------------------------------------------------------------------------------Q15> select student_id,topic,marks where topic='Oracle'; Which one of the
following statements when included in the above statement makes it valid query
1>a where clause
2>a select clause
3>a from clause
4>an order by clause
---------------------------------------------------------------------------------------------------------Q16> You want to join the data from two tables, X and Y, into one result set and display.
Table X and Y have a common column, called Z in both tables. Which of the following
choices correctly displays the where clause you should use if you want to see the table in
table A where the value in column Z equals 10, even when no corresponding value appears
in table Y?
1>where X.Z=10 AND X.Z (+)=Y.Z(+)
2>where A.Z=10 AND A.C=B.C
3>where X.Z=10 AND X.Z=Y.Z(+)
4>where X.Z=10
---------------------------------------------------------------------------------------------------------Q17> You are formulating a SQL statement to retrieve data from oracle database.
Which of the following SQL statement is invalid?
1>select name,topic from course
2>select name,topic from course where empno=101
3>select * course where empno=101
4>select empno from course
Q 21> Output from a table called projects with two columns, project_desc and
Project_manager, is shown next. Which of the following SQL statements produce the
following output;PROJECT DETAILS MUMBAI STOCK EXCHANGE SYSTEM
BASU COCHIN PORT SYSTEM
SHANKARAN NAIR ASIAN SPORTS
MANAGEMENT SYSTEM
VANI GANAPATI
1>SELECT PROJECT_DESC||PROJECT_MANAGER FROM PROJECTS;
2>SELECT PROJECT_DESC,PROJECT_MANAGER FROM PROJECTS;
3>SEL ECT PROJECT_DESC||', '||PROJECT_MANAGER FROM PROJECTS;
4>SELECT PROJECT_DESC||', '||PROJECT_MANAGER PROJECT_DETAILS
FROM PROJECTS;
--------------------------------------------------------------------------------------------------------Q 22> You want to obtain data from the COURSE table, which contains three columns:
TRAINER,COURSEDATE, AND NODAYS. Which of the following choices identifies
how you would formulate the where clause in a query against the COURSE table when you
want to see number of days of training delivery for trainer SHENTANU that exceeds 8?
1>select TRAINER,COURSEDATE, NODAYS from course where
trainer='SHENTANU';
2>select TRAINER,COURSEDATE, NODAYS from course where
trainer='SHENTANU' AND nodays>8;
3>select TRAINER,COURSEDATE, NODAYS from course where
trainer='SHENTANU' OR nodays>8;
4>select TRAINER,COURSEDATE, NODAYS from course where
trainer='SHENTANU' OR nodays<8;
<CORRECT_ANSWER>2
--------------------------------------------------------------------------------------------------------------Q 23> You want to find the number of characters present in the NAME column of EMP
table, Examine the below given data and answer the following: NAME VALUE -------------------- AMAR 4 JOHN 4 MADHU 5 ANU 3 SINGH 5 RANJAN 6 Which of the
following statement produce the above result?
1>select name,len(name) as value from emp;
2>select name,length(name) as value from emp;
3>select name,length(name) from emp;
4>select name,len(name) from emp;
<CORRECT_ANSWER>2
---------------------------------------------------------------------------------------------------------------
<Q 24> Examine the below given data and answer: You want three characters, beginning
from the second character to extract from a longer text string: PROJECT_DETAILS SUB
--------------- ------- FINANCIAL ACCOUNTING INA HUMAN RESOURCE UMA
ESTIMATION STI LIBRARY MANAGEMENT IBR Which of the following statement
will give the above result?</QUESTION_DESC>
1>select project_details,str(project_details,2,3) from projects;
2>select project_details,substring(project_details,2,3) from projects;
3>select project_details,substr(project_details,2,3) from projects;
4>select project_details,mid(project_details,2,3) from projects;
<CORRECT_ANSWER>3
--------------------------------------------------------------------------------------------------------------<Q 25> Examine the Data and Answer: JOINDATE REVIEWDATE ------------------------------ 23-MAY-2006 21-AUG-2006 22-MAY-2006 20-AUG-2006 18-JUL2006 16-OCT-2006 26-FEB-2007 24-JUN-2007 Oracle stores date information internally
as a number, so you can perform arithmetic on dates. You can add numbers to or subtract
numbers from a date in order to determine a new date value. You want to determine the 90
day performance evaluation should take place based on the employee join date. Which of
the following select statement is most appropriate?
1>SELECT SYSDATE+90 AS REVIEWDATE FROM EMP;
2>SELECT JOINDATE+90 AS REVIEWDATE FROM EMP;
3>SELECT JOINDATE+90 FROM EMP;
4>SELECT SYSDATE+90 FROM EMP;
<CORRECT_ANSWER>2
--------------------------------------------------------------------------------------------------------------<Q 26>Examine the given data and answer: JOINDATE Weeks at Work ----------------------------------- 23-MAY-2006 -42.57 22-MAY-2006 -42.71 18-JUL-2006 -34.57 26MAR-2007 1.28 17-MAR-2007 0 You want to determine how many weeks on the job a
particular employee had with the company. Which of following statement is most
appropriate?
1>SELECT JOINDATE,(JOINDATE+SYSDATE)/7 AS "Weeks at Work" from emp;
2>SELECT JOINDATE,(JOINDATE-SYSDATE)/7 AS "Weeks at Work" from
emp;
3>SELECT JOINDATE,(JOINDATE+SYSDATE)/7 from emp;
4>SELECT JOINDATE,(JOINDATE+7) AS "Weeks at Work" from emp;
<CORRECT_ANSWER>2
--------------------------------------------------------------------------------------------------------------<Q 27> You added a PAN number column of VARCHAR2(10) data type to an existing
EMPLOYEES table. The EMPLOYEES table already contains records of 50 employees.
Now, you want to enter the PAN numbers of each of the 50 employees into the tables.
Some of the employees may not have a PAN number available. Which data manipulation
operation do you perform?
1>MERGE
2>INSERT
3>UPDATE
4>You cannot enter the PAN numbers for the existing employee records
<CORRECT_ANSWER>3
--------------------------------------------------------------------------------------------------------------<Q 28> Which of the following SELECT statement will produce the result 'ello World'
from the string 'Hello World'?
1>SELECT SUBSTR('Hello World') FROM dual;
2>SELECT LOWER(TRIM('H' FROM 'Hello World')) FROM dual;
3>SELECT LOWER(SUBSTR('Hello World',2,1) FROM dual;
4>SELECT INITCAP(TRIM('Hello World',1,1)) FROM dual;
<CORRECT_ANSWER>2
--------------------------------------------------------------------------------------------------------------<Q 29>Examine the data and answer: NAME LOCATION_NO SAL --------- ---------------------- MADHU 30 12500 AMALA 30 16000 AKBAR 20 11000 JOHN 20 29750
FAROOQ 20 30000 SACHIN 20 30000 MILAN 10 13000 CHETAN 10 24500 KOMAL
10 50000 What will be the result of the query SELECT MAX(SAL),MIN(SAL) FROM
EMP;
1>50000 AND 11000
2>12500 AND 50000
3>30 AND 10
<CORRECT_ANSWER>1
--------------------------------------------------------------------------------------------------------------<Q 30> You issue a select statement on the customer_acct table containing the order by
clause. Which of the following uses of the order by clause would produce an error?
1>order by acctno desc;
2>order by 1;
3>order by sqrt(1);
4>order by custno asc;
<CORRECT_ANSWER>3
--------------------------------------------------------------------------------------------------------------<Q 31> You issue the following statement: select round(45.256,2) from dual; what result
will this statement display?
1>45
2>45.25
3>45.256
4>45.26
<CORRECT_ANSWER>4
--------------------------------------------------------------------------------------------------------------<Q 32>You create a table but then subsequently realize you need a few additional
columns. To add those new columns later, you should issue which of the following
statements?
1>create or replace table
2>alter table
3>create table
4>truncate table
<CORRECT_ANSWER>2
---------------------------------------------------------------------------------------------------------------
<Q 39> Examine the STUDENT table data and answer: STUDENTID STUDENTNAME
DESIGNATION ----------------- ------------------------ -------------- 1001 AMAR CLERK
1002 AKBAR IT-ENGINEER 1003 VARGISH IT-ENGINEER 1005 KULKARNI
MANAGER 1006 KALYAN IT-ENGINEER Which of the following choices identifies the
value returned by oracle when you issue the following query: select * from student where
studentid>=1005? (choose two)
1>AMAR
2>KULKARNI
3>VARGISH
4>KALYAN
<CORRECT_ANSWER>2,4
--------------------------------------------------------------------------------------------------------------<Q 40>A table called Course contains two columns: CourseNo, defined as a number(10)
datatype, and coursetopic , defined as varchar2(20) datatype. You issue the following
statement on oracle: insert into course(courseno,courseopic) values(null,'ORACLE'). You
then issue the following query against that table: select nvl(courseno,'EMPTY') as courseno
from course where coursetopic='ORACLE';. Which of the following choices correctly
identifies the result?
1>oracle returns zero
2>oracle returns EMPTY
3>oracle returns NULL
4>oracle returns an error
<CORRECT_ANSWER>4
---------------------------------------------------------------------------------------------------------------