READ Free Dumps For Oracle- 1z0-007
Question ID 7937 | What is true about joining tables through an equijoin?
|
Option A | You can join a maximum of two tables through an equijoin.
|
Option B | You can join a maximum of two columns through an equijoin.
|
Option C | You specify an equijoin condition in the SELECT or FROM clauses of a SELECT statement.
|
Option D | To join two tables through an equijoin, the columns in the join condition must be primary key and foreign key columns.
|
Option E | You can join n tables (all having single column primary keys) in a SQL statement by specifying a minimum of n-1 join conditions.
|
Correct Answer | E |
Explanation Explanation/Reference: Explanation: For N joined tables using Oracle or ANSI/ISO syntax for table joins, you need at least N-1 equijoin conditions in the WHERE clause of your SELECT statement or N-1 JOIN table_name ON join_condition clauses in order to avoid a Cartesian product, respectively. Incorrect Answers A: There is no maximum on two tables to join them through an equijoin. B: There is no maximum on two columns to join them through an equijoin. C: You can specify an equijoin condition only in the FROM clauses of a SELECT statement. D: There is no limitation about primary key and foreign key for the columns to use them for an equijoin. OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 99-107 Chapter 3: Advanced Data Selection in Oracle
Question ID 7938 | Scott issues the SQL statements: CREATE TABLE dept (deptno NUMBER(2), dname VARCHAR2(14), loc VARCHAR2(13)}; GRANT SELECT ON DEPT T0 SUE; If Sue needs to select from Scott's DEPT table, which command should she use?
|
Option A | SELECT * FROM DEPT;
|
Option B | SELECT * FROM SCOTT. DEPT;
|
Option C | SELECT * FROM DBA.SCOTT DEPT;
|
Option D | SELECT * FROM ALL_USERS WHERE USER_NAME = 'SCOTT' AND TABLE NAME = 'DEPT';
|
Correct Answer | B |
Explanation Explanation/Reference: Explanation: If the table doesn't exist in your schema, you must prefix the table name with the schema information, separating the owner from the table name with a period. Incorrect Answers A: If you don't have DEPT table in your schema, this statement will fail. C: This statement is incorrect. D: This statement is incorrect. ALL_USERS view is used to extract information about users. OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 28-29 Chapter 1: Overview of Oracle Databases