Home » SQL & PL/SQL » SQL & PL/SQL » 3 questions
3 questions [message #219269] Tue, 13 February 2007 14:11 Go to next message
IT Guru
Messages: 59
Registered: January 2007
Member
You use this statement to retrieve data from a database table for _______________. (Choose all that apply)

A. updating
B. viewing
C. deleting
D. inserting
E. truncating


----------------------------------------------------------------

157. The STUDENT_GRADES table has these columns
STUDENT_ID NUMBER (12)
SEMESTER_END DATE
GPA NUMBER (4, 3)

The registrar has asked for a report on the average grade point average (GPA) for students enrolled during semesters that end in the year 2000. Which statement accomplishes this?

A. SELECT AVERAGE(gpa) FROM student_grades WHERE semester_end > '01-JAN-2000' and semester end < '31-DEC-2000'
B. SELECT COUNT (gpa) FROM student grades WHERE semester_end > '01-JAN-2000' and semester end < '31-DEC-2000'
C. SELECT MID (gpa) FROM student_grades WHERE semester_end > '01-JAN-2000' and semester end < '31-DEC-2000' D. SELECT AVG (gpa) FROM student_grades WHERE semester_end > '01-JAN-2000' and semester end < '31-DEC-2000'
D. SELECT SUM (gpa) FROM student_grades WHERE semester_end > '01-JAN-2000' and semester end < '31-DEC-2000'
E. SELECT MEDIAN (gpa) FROM student_grades WHERE semester_end > '01-JAN-2000' and semester end < '31-DEC-2000'


-------------------------------------------------------
44. Which two statements complete a transaction? (Choose two.)

A. DELETE employees;
B. DESCRIBE employees;
C. ROLLBACK TO SAVEPOINT C;
D. GRANT SELECT ON employees TO SCOTT;
E. ALTER TABLE employees SET UNUSED COLUMN sal;
F. SELECT MAX(sal) FROM employees WHERE department_id = 20;
Re: 3 questions [message #219276 is a reply to message #219269] Tue, 13 February 2007 14:53 Go to previous messageGo to next message
Bill B
Messages: 1484
Registered: December 2004
Senior Member
We will help users if they try, what are your answers and what is your reasoning for them. We will NOT do your homework for you. It is a disservice to you and your instructor.
Re: 3 questions [message #219295 is a reply to message #219269] Tue, 13 February 2007 20:37 Go to previous messageGo to next message
ab_trivedi
Messages: 460
Registered: August 2006
Location: Pune, India
Senior Member
@ITGURU,
You must try it and I am sure you can do it!
Ashu
Re: 3 questions [message #219454 is a reply to message #219269] Wed, 14 February 2007 08:47 Go to previous messageGo to next message
MarcL
Messages: 455
Registered: November 2006
Location: Connecticut, USA
Senior Member
Not much of a guru if you are asking these questions
Re: 3 questions [message #219531 is a reply to message #219269] Wed, 14 February 2007 15:00 Go to previous messageGo to next message
IT Guru
Messages: 59
Registered: January 2007
Member
Last nitgh was working till late, so in little time I just copy paste q. which I wanted to ask... had no idea that some one may assume that I am try to get my home work done here... any way



--------------------------------------------------------

[ I belive only VIEWING will come but in dumps found many people also select INSERTING with viewing.]

You use this statement to retrieve data from a database table for _______________. (Choose all that apply)

A. updating
B. viewing
C. deleting
D. inserting
E. truncating


----------------------------------------------------------------

[ I feel corect answers are B D F, but q. ask for selecting only 2 ]
[ LIKE is single query oprator, if multiplue row return more then one values it give error]

14. Which two statements about Subqueries are true? (Choose two.)

A. A single row subquery can retrieve data from only one table.
B. A SQL query statement cannot display data from table B that is referred to in its subquery, unless table B is included in the main query's FROM clause.
C. A SQL query statement can display data from table B that is referred to in its subquery, without including table B in its own FROM clause.
D. A single row subquery can retrieve data from more than one table.
E. A single row subquery cannot be used in a condition where the LIKE operator is used for comparison.
F. A multiple-row subquery cannot be used in a condition where the LIKE operator is used for comparison.



-------------------------------------------------------
[ I think E alter table is only DDL command which implictly does commit]

[EVEN after ROLLBACK to save point C, there is chances that I may roll back to save point B or give ROLL BACK / COMMIT so does not seems complete transaction.]

44. Which two statements complete a transaction? (Choose two.)

A. DELETE employees;
B. DESCRIBE employees;
C. ROLLBACK TO SAVEPOINT C;
D. GRANT SELECT ON employees TO SCOTT;
E. ALTER TABLE employees SET UNUSED COLUMN sal;
F. SELECT MAX(sal) FROM employees WHERE department_id = 20;


PLEASE GIVE ME YOUR VALUEABLE OPIONS IF POSSIBLE WITH EXPLANATION THANKS YOU
Re: 3 questions [message #219574 is a reply to message #219531] Thu, 15 February 2007 00:42 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Maybe I just read it wrong, but isn't there a line missing from the first question? What does 'this statement' refer to??

About q2-F: what if you use IN? Then a multiple row subquery would be valid.

q3: Easy to test. Grant also ends a transaction.

[Updated on: Thu, 15 February 2007 00:45]

Report message to a moderator

Re: 3 questions [message #219658 is a reply to message #219574] Thu, 15 February 2007 05:42 Go to previous message
IT Guru
Messages: 59
Registered: January 2007
Member
Frank wrote on Thu, 15 February 2007 00:42
Maybe I just read it wrong, but isn't there a line missing from the first question? What does 'this statement' refer to??

About q2-F: what if you use IN? Then a multiple row subquery would be valid.

q3: Easy to test. Grant also ends a transaction.




Q2 cant change option so cant add IN
[PS even with IN does not work gives error, logically correct but not working !]

Q3 ya grant does implicit commit

[Updated on: Thu, 15 February 2007 11:55]

Report message to a moderator

Previous Topic: sum up columns
Next Topic: Drop object type that is marked for delete
Goto Forum:
  


Current Time: Sat Dec 10 22:46:14 CST 2016

Total time taken to generate the page: 0.10414 seconds