Evaluate this SQL statement: SELECT e.emp_name, d.dept_name FROM employees e
JOIN departments d USING (department_id) WHERE d.department_id NOT IN (10,40)
ORDER BY dept_name; The statement fails when executed. Which change fixes the error?
A.
remove the table alias prefix from the WHERE clause
B.
replace the condition ”d.department_id NOT IN (10,40)” in the WHERE clause with
”d.department_id <> 10 AND d.department_id <> 40”
C.
prefix the column in the ORDER BY clause with the table alias
D.
remove the table alias from the SELECT clause
E.
remove the ORDER BY clause
F.
prefix the column in the USING clause with the table alias
Please somebody clarify why D is correct.Removing Alias name from select clause? If C is the correct answer then D contradicts with it.
Somebody could help about that question? Why c and d?
As far as I know the correct answer is A.
Because in an INNER JOIN with USING clause you can not use an alias in the columns of the join, but you get ORA-25154
An alias cannot be used with the natural join clause but it can be used in an INNNER JOIN with USING clause.
A is the correct answer.
I’ve just run this on a test database, and A is the correct answer.
A is the correct answer
column used in JOIN and NATURAL JOIN can’t use with qualifier in any place ( select ,where,order etc)
Seems A is the correct answer. Both C and D are wrong answers or irrelevant because the query still runs if the aliases are there or not there in the SELECT clause and/or in the ORDER BY clause.
Cleared Oracle Database 11g 1Z0-051 exam last weekend!
Scored 90%! (The passing score is 60%)
There were 64 questions in my actual 1Z0-051 test.
Many questions on SQL statements (Examine, Evaluate…etc.), Manipulating Data (Insert, Update, Delete), Using DDL Statements to Create and Manage Tables.
Also, please pay close attention to questions on Reporting Aggregated Data Using the Group Functions, Using Subqueries to Solve Queries, Creating Schema Objects, a little difficult!
I mainly learned the PassLeader 1Z0-051 dumps (http://www.passleader.com/1z0-051.html) (303q VCE and PDF), all questions were from it, and many wrong answers have been corrected in it, the most valid 1Z0-051 dumps! DO RECOMMEND!!
By the way, part of that 303q 1Z0-051 dumps are available here:
http://www.oraclebraindump.com/?s=1z0-051
(
p.s. More 1Z0-051 exam questions on Google Drive: drive.google.com/open?id=0B-ob6L_QjGLpWXpBUEhyRnVXVlE
)
Good Luck!!!
A is correct
SELECT STR1 ,A.DATA1 FROM PROVA1 A JOIN PROVA2 B USING (STR1) WHERE a.STR1 = ‘uno’
ORA-25154: la parte della colonna con la clausola USING non può disporre di un qualificatore
If the column is not ambiguos you can use or not use a qulifier
es.
SELECT STR1 ,A.DATA1 FROM PROVA1 A JOIN PROVA2 B USING (STR1) WHERE STR1 = ‘due’
order by DATA1
STR1 DATA1
———- ———
due 27-GEN-17