Test
Final Study
Crea una cuenta gratis para terminar este test
Guarda tu progreso y consulta tu resultado final.
¿Ya tienes cuenta? Inicia sesión
Preguntas del test (103)
1In the initial creation of a table, if a unique constraint is included for a composite column that requires the combination of entries in the specified columns to be unique. Which of the following statement is correct?
- AThe constraint can be created only with the ALTER TABLE command.
- BThe constraint can be created only with the table-level approach.
- CThe constraint can be created only with the column-level approach.
- DThe constraint can be created only with the ALTER TABLE... MODIFY command.
2Which type of constraint should you use on a column to allow entering only values above 100?
- APRIMARY KEY
- BUNIQUE
- CCHECK
- DNOT NULL
3Which of the following commands can be used to enable a disabled constraint?
- AALTER TABLE... MODIFY
- BALTER TABLE... ADD
- CALTER TABLE...DISABLE
- DALTER TABLE... ENABLE
4Which of the following keywords allows the user to delete a record from a table, even if row in another table reference the record through a FOREIGN KEY constraint?
- ACASCADE
- BCASCADE ON DELETE
- CDELETE ON CASCADE
- DDROP
- EON DELETE CASCADE
5Which of the following data dictionary objects should be used to view information about the constraint in a database?
- AUSER... TABLES
- BUSER... RULES
- CUSER... COLUMNS
- DUSER... CONSTRAINTS
- ENone of the above objects should be used.
6Which of the following types of constraints can't be created at the table level?
- ANOT NULL
- BPRIMARY KEY
- CCHECK
- DFOREIGN KEY
- ENone of the constraint can be created at the table level.
7Suppose you create a PRIMARY KEY constraint at the same time you created a table and later decide to name the constraint. Which of the following commands can you use to change the constraint's name?
- AALTER TABLE...MODIFY
- BALTER TABLE...ADD
- CALTER TABLE... DISABLE
- DNone of the above commands can be used.
8You're creating a new table consisting of three columns: Col1, Col2, and Col3. Col1 should be the primary key and can't have any NULL values, and each entry should be unique. Col3 must not contain any NULL values either. How many constraints do you have to create.
- A1
- B2
- C3
- D4
9Which of the following types of restrictions can be viewed with the DESCRIBE command?
- ANOT NULL
- BFOREIGN KEY
- CUNIQUE
- DCHECK
10Which of the following is the valid syntax for adding a PRIMARY KEY constraint to an existing table?
- AALTER TABLE tablename ADD CONSTRAINT PRIMARY KEY (columnname);
- BALTER TABLE tablename ADD CONSTRAINT (columname) PRIMARY KEY constraintname;
- CALTER TABLE tablename ADD [CONSTRAINT constraintname] PRIMARY KEY;
- DNone of the above is valid syntax.
11Which of the following represents a row in a table?
- AAn attribute
- BA characteristic
- CA field
- DA record
12Which of the following defines a relationship in which each occurrence of data in one entity is represented by multiple occurrence of the data in the other entity?
- AOne to one
- BOne to many
- CMany to many
- DNone of the above
13An entity is represented in an ER model as a(n):
- AArrow
- BCrow's foot
- CDashed line
- DNone of the above
14Which of the following is not an ER model relationship?
- ASome to many
- BOne to one
- COne to many
- DMany to many
15Which of the following symbols represents a many-to-many relationship in an E-R model?
- AA straight line
- BA dashed line
- CA straight line with crow's feet at both ends
- DA straight line with crow's feet at one end
16Which of the following can contain repeating groups?
- AUnnormalized data
- B1NF
- C2NF
- D3NF
17Which of the following defines a relationship in which each occurrence of data in one entity is represented by only one occurrence of data in the entity?
- AOne to one
- BOne to many
- CMany to many
- DNone of the above
18Which of the following has no partial or transitive dependencies?
- AUnnormalized data
- B1NF
- C2NF
- D3NF
19Which of the following symbols represents a one-to-many relationship in an E-R model?
- AA straight line
- BA dashed line
- CA straight line with a crow's foot at both ends
- DA straight line with a crow's foot at one end
20Which of the following has no partial dependencies but can contain transitive dependencies?
- AUnnormalized data
- B1NF
- C2NF
- D3NF
21Which of the following is a correct statement?
- AA commit is issued implicitly when a user exits SQL Developer or SQL*Plus
- BA commit is issued implicitly when a DDL command is executed.
- CA commit is issued automatically when a DML command is executed.
- DAll the above are correct.
- EBoth a and b are correct
- FBoth a and c are correct
22Which of the following is a valid SQL statement?
- ASELECT * WHERE amid = 'J100' FOR UPDATE;
- BINSERT INTO homework 10 VALUES (SELECT * FROM acctmanager);
- CDELETE amid FROM acctmanager,
- DRollback;
- EAll the above
23Which of the following commands can be used to add rows to a table?
- AINSERT INTO
- BALTER TABLE... ADD
- CUPDATE
- DSELECT... FOR UPDATE
24Which of the following statements deletes all rows in the HOMEWORK 10 table?
- ADELETE * FROM homework10;
- BDELETE * .* FROM homework10;
- CDELETE FROM homework10;
- DDELETE FROM homework10 WHERE amid='*;
- EBoth c and d delete all rows in the HOMEWORK 10 table.
25Which of the following statements places a share lock on at least a position of a table named HOMEWORK10?
- ASELECT * FROM homework10 WHERE col2 IS NULL FOR UPDATE;
- BINSERT INTO homework10 (col1, col2, col3) VALUES ('A', 'B', 'C');
- CUPDATE homework 10 SET col3 = NULL WHERE col1 = 'A';
- DUPDATE homework 10 SET col3 = LOWER (col3) WHERE col1 = 'A';
- EAll the above
26Assuming the HOMEWORK10 TABLE has three columns (Col1, Col2, and Col3, in this order), which of the following commands stores a NULL value in Col3 of the HOMEWORK10 table?
- AINSERT INTO homework10 VALUES ('A', 'B', 'C');
- BINSERT INTO homework 10 (col3, col1, col2) VALUES (NULL, 'A', 'B');
- CINSERT INTO homework10 VALUES (NULL, 'A', 'B');
- DUPDATE homework 10 SET col1 = col3;
27Which of the following symbols designates a substitute variable?
- A&
- B$
- C#
- D-
28Which of the following input values result in a successful INSERT of O'hara?
- A'O'hara'
- B'O'hara' (two single quotes following the O)
- C'O'hara' (a double quote following the O)
- DData values can't contain quotes.
29Which of the following commands locks the HOMEWORK10 table in EXCLUSIVE model?
- ALOCK TABLE homework 10 EXCLUSIVELY;
- BLOCK TABLE homework10 IN EXCLUSIVE MODE;
- CLOCK TABLE homework10 TO OTHER USERS;
- DLOCK homework10 INEXCLUSIVE MOVE;
- EBoth b and d lock the table in EXCLUSIVE mode.
30You issue the following command: INSERT INTO homework10 (col1, col2, col3) VALUES ('A', NULL, 'C'). The command will fail if which of the following statements is true?
- ACol1 has a PRIMARY KEY constraint enabled.
- BCol2 has a UNIQUE constraint enabled
- CCol3 is defined as a DATE column.
- DNone of the above would cause the command to fail.
31Which of the following SELECT statements displays a list of customer names from the CUSTOMER tables?
- ASELECT customer names FROM customers;
- BSELECT "Names" FROM customers;
- CSELECT firstname, lastname FROM customers;
- DSELECT firstname, lastname, FROM customers;
- ESELECT firstname, lastname, "Customer Names" FROM customers;
32Which clause is required in a SELECT statement?
- AWHERE
- BORDER BY
- CGROUP BY
- DFROM
- EAll the above
33Which of the following is not a valid SELECT statement?
- ASELECT lastname, firstname FROM customers;
- BSELECT * FROM orders;
- CSelect FirstName NAME from CUSTOMERS;
- DSELECT lastname Last Name FROM customers;
34Which of the following symbols represents concatenation?
- A*
- B| |
- C[]
- D''
35Which of the following SELECT statements returns all fields in the ORDERS table?
- ASELECT customer#, order#, orderdate, shipped, address FROM order;
- BSELECT * FROM orders;
- CSELECT ? FROM orders;
- DSELECT ALL FROM orders;
36Which of the following generates a series of integers that can be stored in a database?
- AA number generator
- BA view
- CA sequence
- DAn index
- EA synonym
37Which syntax is correct for removing a public synonym?
- ADROP SYNONYM synonymname;
- BDELETE PUBLIC SYNONYM synonymname;
- CDROP PUBLIC SYNONYM synonymname;
- DDELETE SYNONYM synonymname;
38Which of the following commands can you use to modify an index?
- AALTER SESSION
- BALTER TABLE
- CMODIFY TABLE
- DALTER INDEX
- ENone of the above
39Which of the following generates an integer in a sequence?
- ANEXTVAL
- BCURVAL
- CNEXT_VALUE
- DCURR-VALUE
- ENEXT_VAL
- FCUR_VAL
40Which of the following is a valid SQL statement?
- AINSERT INTO publisher VALUES (pubsequence. Nextvalue, 'HAPPY PRINTING', 'LAZY LARRY', NULL);
- BCREATE INDEX a_new_index ON (firstcolumn*.02);
- CCREATE SYNONYM pub FOR publisher;
- DAll the above
- Eonly a and c
- FNone of the above
41Which of the following commands creates a new table containing two columns?
- ACREATE TABLE newname (col1 DATE default, col2 VARCHAR2);
- BCREATE TABLE newname AS (SELECT title, retail, cost FROM books);
- CCREATE TABLE newname (col1, col2);
- DCREATE TABLE newname (col1, DATE DEFAULT SYSDATE, col2, VARCHAR2(1);
42Which of the following is a valid table name?
- A9NEWTABLE
- BDATE9
- CNEWTABLE
- DNone of the above are valid table names.
43Which of the following is a valid datatype?
- ACHAR3
- BVARCHAR3
- CNUM
- DNUMBER
44Which object in the data dictionary enable you to verify DEFAULT column settings?
- ADEFAULT_COLUMN
- BDEF_TAB_COLUMNS
- CUSER_TAB_COLUMNS
- DNone of the above
45Which of the following SQL statements changes the size of the title column in the BOOKS table from the current length of 30 characters to the length of 35 characters?
- AALTER TABLE books CHANGE title VARCHAR (35);
- BALTER TABLE books MODIFY (title VARCHAR2 (35));
- CALTER TABLE books MODIFY title (VARCHAR2 (35));
- DALTER TABLE books MODIFY (title VARCHAR2 (+5));
46For data to be come an information it must be:
- AConcise
- BRelevant
- CPrecise
- DCorrect
47Which of the following is the last MODEL of the System Development Life Cycle
- ATesting
- BInvestigating
- CMaintenance
- DResearch and Development
48What is the title of the TEXT we are using for the class of Database Management Systems 2040?
- AOracle 12C: SQL
- BOracle 12C Developer
- COracle 12C PLUS
- DAll the above
49Which of the following statement is true?
- ADatabase systems deals with the integration of different components of a computer
- BData is an information under consideration
- CDatabase management deals with managing data only
- DOnly a and b
- EAll the above
50Which of the following statements are true?
- AOne to many
- BMany to many
- COne to one
- DAll of the above
51Which of the following is a valid SQL statement?
- ASELECT SYSDATE;
- BSELECT UPPER(Hello) FROM dual;
- CSELECT TO_CHAR(SYSDATE, 'Month DD, YYYY') FROM dual;
- Dall of the above
- Enone of the above
52Which of the following functions can be used to extract a portion of a character string?
- AEXTRACT
- BTRUNC
- CSUBSTR
- DINITCAP
53Which of the following determines how long ago orders that haven't shipped were received?
- ASELECT order#, shipdate-orderdate delay
FROM orders; - BSELECT order#, SYSDATE - orderdate
FROM orders
WHERE shipdate IS NULL; - CSELECT order#, NVL (shipdate, 0)
FROM orders
WHERE orderdate is NULL; - DSELECT order#, NULL(shipdate)
FROM orders;
- ASELECT order#, shipdate-orderdate delay
54Which of the following SQL statements produces "Hello World" as the output?
- ASELECT "Hello World" FROM dual;
- BSELECT INITCAP('HELLO WORLD') FROM dual;
- CSELECT LOWER('HELLO WORLD') FROM dual;
- Dboth a and b
- Enone of the above
55Which of the following functions can be used to substitute a value for a NULL value?
- ANVL
- BTRUNC
- CNVL2
- DSUBSTR
- Eboth a and d
- Fboth a and c
56Which of the following is not a valid format argument for displaying the current time?
- A'HH:MM:SS'
- B'HH24:SS'
- C'HH12:MISS'
- DAll of the above are valid.
57Which of the following lists only the last four digits of the contact person's phone number at American Publishing?
- ASELECT EXTRACT(phone, -4, 1)
FROM publisher
WHERE name = 'AMERICAN PUBLISHING'; - BSELECT SUBSTR(phone, -4, 1)
FROM publisher
WHERE name = 'AMERICAN PUBLISHING'; - CSELECT EXTRACT(phone, -1, 4)
FROM publisher
WHERE name = 'AMERICAN PUBLISHING'; - DSELECT SUBSTR(phone, -4, 4)
FROM publisher
WHERE name = 'AMERICAN PUBLISHING';
- ASELECT EXTRACT(phone, -4, 1)
58Which of the following functions can be used to determine how many months a book has been available?
- AMONTH
- BMON
- CMONTH_BETWEEN
- Dnone of the above
59Which of the following displays the order date for order 1000 as 03/31?
- ASELECT TO_CHAR(orderdate, 'MM/DD')
FROM orders
WHERE order# = 1000; - BSELECT TO_CHAR(orderdate, 'Mth/DD')
FROM orders
WHERE order# = 1000; - CSELECT TO_CHAR(orderdate, 'MONTH/YY')
FROM orders
WHERE order# = 1000; - Dboth a and b
- Enone of the above
- ASELECT TO_CHAR(orderdate, 'MM/DD')
60Which of the following functions can produce different results, depending on the value of a specified column?
- ANVL
- BDECODE
- CUPPER
- DSUBSTR
61Which of the following SQL statements is NOT valid?
- ASELECT TO_CHAR(orderdate, '99/9999')
FROM orders; - BSELECT INITCAP(firstname), UPPER(lastname)
FROM customers; - CSELECT cost, retail,
TO_CHAR(retail-cost, '$999.99') profit
FROM books; - Dall of the above
- ASELECT TO_CHAR(orderdate, '99/9999')
62Which function can be used to add spaces to a column until it's a specific width?
- ATRIML
- BPADL
- CLWIDTH
- Dnone of the above
63Which of the following SELECT statements returns 30 as the result?
- ASELECT ROUND(24.37, 2) FROM dual;
- BSELECT TRUNC(29.99, 2) FROM dual;
- CSELECT ROUND(29.01, -1) FROM dual;
- DSELECT TRUNC(29.99, -1) FROM dual;
64Which of the following is a valid SQL statement?
- ASELECT TRUNC (ROUND(125.38, 1), 0) FROM dual;
- BSELECT ROUND (TRUNC(125.38, 0)
FROM dual; - CSELECT LTRIM(LPAD(state, 5, ' '), 4, -3, "*")
FROM dual; - DSELECT SUBSTR (ROUND(14.87, 2, 1), -4, 1)
FROM dual;
65Which of the following functions can't be used to convert the letter case of a character string?
- AUPPER
- BLOWER
- CINITIALCAP
- DAll of the above can be used for case conversion
66Which of the following format elements causes months to be displayed as a three-letter abbreviation?
- AMMM
- BMONTH
- CMON
- Dnone of the above
67Which of the following SQL statements displays a customer's name in all uppercase characters?
- ASELECT UPPER('firstname', 'lastname')
FROM customers; - BSELECT UPPER(firstname, lastname)
FROM customers; - CSELECT UPPER(lastname, ',' firstname)
FROM customers; - Dnone of the above
- ASELECT UPPER('firstname', 'lastname')
68Which of the following functions can be used to display the character string FLORIDA in the query results whenever FL is entered in the State field?
- ASUBSTR
- BNVL2
- CREPLACE
- DTRUNC
- Enone of the above
69What's the name of the table provided by Oracle 12c for completing queries that don't involve a table?
- ADUMDUM
- BDUAL
- CORAC
- DSYS
70If an integer is multiplied by a NULL value, the result is:
- Aan integer
- Ba whole number
- Ca NULL value
- DNone of the above- a syntax error message is returned.
71Which of the following statements is true?
- AThe MIN function can be used only with numeric data.
- BThe MAX function can be used only with date values.
- CThe AVG function can be used only with numeric data.
- DThe SUM function can't be part of a nested function.
72Which of the following is a valid SELECT statement?
- ASELECT AVG(retail-cost)
FROM books
GROUP BY category; - BSELECT category, AVG(retail-cost)
FROM books; - CSELECT category, AVG(retail-cost)
FROM books
WHERE AVG(retail-cost) > 8.56
GROUP BY category; - DSELECT category, AVG(retail-cost) Profit
FROM books
GROUP BY category
HAVING profit > 8.56;
- ASELECT AVG(retail-cost)
73Which of the following statements is correct?
- AThe WHERE clause can contain a group function only if the function isn't also listed in the SELECT clause.
- BGroup functions can't be used in the SELECT, FROM, or WHERE clauses.
- CThe HAVING clause is always processed before the WHERE clause.
- DThe GROUP BY clause is always processed before the HAVING clause.
74Which of the following is NOT a valid SQL statement?
- ASELECT MIN(pubdate)
FROM books
GROUP BY category
HAVING pubid = 4; - BSELECT MIN(pubdate)
FROM books
WHERE category = 'COOKING'; - CSELECT COUNT(*)
FROM orders
WHERE customer# = 1005; - DSELECT MAX(COUNT(customer#))
FROM orders
GROUP BY customer#;
- ASELECT MIN(pubdate)
75Which of the following statements is correct?
- AThe COUNT function can be used to determine how many rows contain a NULL value.
- BOnly distinct values are included in group functions, unless the ALL keyword is included in the SELECT clause.
- CThe HAVING clause restricts which rows are processed.
- DThe WHERE clause determines which groups are displayed in the query results.
- Enone of the above
76Which of the following is a valid SQL statement?
- ASELECT customer#, order#, MAX(shipdate-orderdate)
FROM orders
GROUP BY customer#
WHERE customer# = 1001; - BSELECT customer#, COUNT(order#)
FROM orders
GROUP BY customer#; - CSELECT customer#, COUNT(order#)
FROM orders
GROUP BY COUNT(order#); - DSELECT customer#, COUNT(order#)
FROM orders
GROUP BY ordre#;
- ASELECT customer#, order#, MAX(shipdate-orderdate)
77Which of the following SELECT statements lists only the book with the largest profit?
- ASELECT title, MAX (retail-cost)
FROM books
GROUP BY title; - BSELECT title, MAX (retail-cost)
FROM books
GROUP BY title
HAVING MAX(retail-cost); - CSELECT title, MAX (retail-cost)
FROM books; - DNone of the above
- ASELECT title, MAX (retail-cost)
78Which of the following is correct?
- AA group function can be nested inside a group function.
- BA group function can be nested inside a single-row function.
- CA single-row function can be nested inside a group function.
- Da and b
- Ea, b, and c
79Which of the following functions is used to calculate the total value stored in a specified column?
- ACOUNT
- BMIN
- CTOTAL
- DSUM
- EADD
80Which of the following SELECT statements lists the highest retail price of all books in the Family category?
- ASELECT MAX(retail)
FROM books
WHERE category = 'FAMILY'; - BSELECT MAX(retail)
FROM books
HAVING category = 'FAMILY'; - CSELECT retail
FROM books
WHERE category = 'FAMILY'
HAVING MAX(retail); - Dnone of the above
- ASELECT MAX(retail)
81Which of the following functions can be used to include NULL values in calculations?
- ASUM
- BNVL
- CMAX
- DMIN
82Which of the following is NOT a valid statement?
- AYou must enter the ALL keyword in a group function to include all duplicate values.
- BThe AVG function can be used to find the average calculated difference between two dates.
- CThe MIN and MAX functions can be used on any type of data.
- Dall of the above
- Enone of the above
83Which of the following SQL statements determines how many total customers were referred by other customers?
- ASELECT customer#, SUM(referred)
FROM customers
GROUP BY customer#; - BSELECT COUNT(referred)
FROM customers; - CSELECT COUNT(*)
FROM customers; - DSELECT COUNT(*)
FROM customers
WHERE referred IS NULL;
- ASELECT customer#, SUM(referred)
84Which of the following functions can be used to determine the earliest ship date for all orders recently processed by JustLee Books?
- ACOUNT function
- BMAX function
- CMIN function
- DSTDDEV function
- EVARIANCE function
85Which of the following is NOT a valid SELECT statement?
- ASELECT STDDEV(retail)
FROM books; - BSELECT AVG(SUM(retail))
FROM orders
NATURAL JOIN orderitems NATURAL JOIN books
GROUP BY customer#; - CSELECT order#, TO_CHAR(SUM(retail), '999.99')
FROM orderitems JOIN books USING(isbn)
GROUP BY order#; - DSELECT title, VARIANCE(retail-cost)
FROM books
GROUP BY pubid;
- ASELECT STDDEV(retail)
86Which query identifies customers living in the same state as the customer named Leila Smith?
- ASELECT customer# FROM customers
WHERE state= (SELECT state FROM customers
WHERE lastname = 'SMITH'); - BSELECT customer# FROM customers
WHERE state = (SELECT state FROM customers
WHERE lastname = 'SMITH'
OR firstname = 'LEILA'); - CSELECT customer# FROM customers
WHERE state = (SELECT state FROM customers
WHERE lastname = 'SMITH'
AND firstname = 'LEILA'
ORDER BY customer); - DSELECT customer# FROM customers
WHERE state = (SELECT state FROM customers
WHERE lastname = 'SMITH'
AND firstname = 'LEILA');
- ASELECT customer# FROM customers
87Which of the following is a valid SELECT statement?
- ASELECT order# FROM orders
WHERE shipdate = SELECT shipdate FROM orders
WHERE order# = 1010; - BSELECT order# FROM orders
WHERE shipdate = (SELECT shipdate FROM orders)
AND order# = 1010; - CSELECT order# FROM orders
WHERE shipdate = (SELECT shipdate FROM orders
WHERE order# = 1010); - DSELECT order# FROM orders
HAVING shipdate = (SELECT shipdate FROM orders
WHERE order# = 1010);
- ASELECT order# FROM orders
88Which of the following operators is considered a single-row operator?
- AIN
- BALL
- C<>
- D<>ALL
89Which of the following queries determines which customers have ordered the same books as customer 1017?
- ASELECT ordre# FROM orders
WHERE customer# = 1017; - BSELECT customer# FROM orders
JOIN orderitems USING (order#)
WHERE isbn = (SELECT isbn FROM orderitems
WHERE customer# = 1017); - CSELECT customer# FROM orders
WHERE order# = (SELECT order# FROM orderitems
WHERE customer# = 1017); - DSELECT customer# FROM orders
JOIN orderitems USING (order#)
WHERE isbn IN (SELECT isbn FROM orderitems
JOIN orders USING (order#)
WHERE customer# = 1017);
- ASELECT ordre# FROM orders
90Which of the following statements is valid?
- ASELECT title FROM books
WHERE retail < (SELECT cost FROM books
WHERE isbn = '9959789321'); - BSELECT title FROM books
WHERE retail = (SELECT cost FROM books
WHERE isbn = '9959789321' ORDER BY cost); - CSELECT title FROM books
WHERE category IN (SELECT cost FROM orderitems
WHERE isbn = '9959789321'); - Dnone of the above statements
- ASELECT title FROM books
91Which of the following statements is correct?
- AIf a subquery is used in the outer query's FROM clause, the data in the temporary table can't be referenced by clauses used in the outer query.
- BThe temporary table created by a subquery in the outer query's FROM clause must be assigned a table alias, or it can't be joined with another table by using the JOIN keyword.
- CIf a temporary table is created through a subquery in the outher query's FROM clause, the data in the temporary table can be referenced by another clause in the outer query.
- Dnone of the above
92Which of the following queries identifies other customers who were referred to JustLee Books by the same person who referred Jorge Perez?
- ASELECT customer# FROM customers
WHERE referred = (SELECT referred FROM customers
WHERE firstname = 'JORGE'
AND lastname = 'PEREZ'); - BSELECT referred FROM customers
WHERE (customer#, referred) = (SELECT customer#
FROM customers WHERE firstname = 'JORGE'
AND lastname = 'PEREZ'); - CSELECT referred FROM customers
WHERE (customer#, referred) IN (SELECT customer#
FROM customers WHERE firstname = 'JORGE'
AND lastname = 'PEREZ'); - DSELECT customer# FROM customers
WHERE customer# = (SELECT customer#
FROM customers WHERE firstname = 'JORGE'
AND lastname = 'PEREZ');
- ASELECT customer# FROM customers
93In which of the following situations is using a subquery suitable?
- Awhen you need to find all customers living in a particular region of the country
- Bwhen you need to find all publishers who have toll-free telephone numbers
- Cwhen you need to find the titles of all books shipped on the same date as an order placed by a particular customer
- Dwhen you need to find all books published by Publisher 4
94Which of the following queries identifies customers who have ordered the same books as customers 1001 and 1005?
- ASELECT customer# FROM orders
JOIN books USING (isbn)
WHERE isbn = (SELECT isbn FROM orderitems
JOIN books USING (isbn)
WHERE customer# = 1001 OR customer# = 1005)); - BSELECT customer# FROM orders
JOIN books USING (isbn)
WHERE isbn <ANY(SELECT isbn FROM orderitems
JOIN books USING (isbn)
WHERE customer# = 1001 OR customer# = 1005)); - CSELECT customer# FROM orders
JOIN books USING (isbn)
WHERE isbn = (SELECT isbn FROM orderitems
JOIN orders USING (order#)
WHERE customer# = 1001 OR customer# = 1005)); - DSELECT customer# FROM orders
JOIN orderitems USING (order#)
WHERE isbn IN (SELECT isbn FROM orders
JOIN books USING (isbn)
WHERE customer# IN (1001, 1005));
- ASELECT customer# FROM orders
95Which of the following operators is used to find all values greater than the highest value returned by a subquery?
- A>ALL
- B<ALL
- C>ANY
- D<ANY
- EIN
96Which of the following statements is correct?
- AThe IN comparison operator can't be used with a subquery that returns only one row of results.
- BThe equals (=) comparison operator can't be used with a subquery that returns more than one row of results.
- CIn an uncorrelated subquery, statements in the outer query are executed first, and then statements in the subquery are executed.
- DA subquery can be nested only in the outer query's SELECT clause.
97What is the purpose of the following query?
SELECT isbn, title FROM books
WHERE (pubid, category) IN (SELECT pubid, category
FROM books WHERE title LIKE '%ORACLE%');- AIt determines which publisher published a book belonging to the Oracle category and then lists all other books published by that same publisher.
- BIt lists all publishers and categories containing the value ORACLE.
- CIt lists the ISBN and title of all books belonging to the same category and having the same publisher as any book with the phrase ORACLE in its title.
- DNone of the above. The query contains a multiple-row operator, and because the inner query returns only one value, the SELECT statement will fail and return an error message.
98A subquery must be placed in the outer query's HAVING clause if:
- AThe inner query needs to reference the value returned to the outer query.
- BThe value returned by the inner query is to be compared to grouped data in the outer query.
- CThe subquery returns more than one value to the outer query.
- DNone of the above. Subqueries can't be used in the outer query's HAVING clause.
99Which of the following statements is correct?
- AIf the subquery returns only a NULL value, the only records returned by an outer query are those containing an equivalent NULL value.
- BA multiple-column subquery can be used only in the outer query's FROM clause.
- CA subquery can contain only one condition in its WHERE clause.
- DThe order of columns listed in the SELECT clause of a multiple-column subquery must be in the same order as the corresponding columns listed in the outer query's WHERE clause.
100In a MERGE statement, an INSERT is placed in which conditional clause?
- AUSING
- BWHEN MATCHED
- CWHEN NOT MATCHED
- DINSERTS aren't allowed in a MERGE statement.
101Given the following query, which statement is correct?
SELECT order# FROM orders
WHERE order# IN (SELECT order# FROM orderitems
WHERE isbn = '9959789321');- AThe statement doesn't execute because the subquery and outer query don't reference the same table.
- BThe outer query removes duplicates in the subquery's Order# list.
- CThe query fails if only one result is returned to the outer query because the outer query's WHERE clause uses the IN comparison operator.
- DNo rows are displayed because the ISBN in the WHERE clause is enclosed in single quotation marks.
102Given the following SQL statement, which statement is most accurate?
SELECT customer# FROM customers
JOIN orders USING(customer#)
WHERE shipdate-orderdate IN
(SELECT MAX(shipdate-orderdate) FROM orders
WHERE shipdate IS NULL);- AThe SELECT statement fails and returns an Oracle error message.
- BThe outer query displays no rows in its results because the subquery passes a NULL value to the outer query.
- CThe customer number is displayed for customers whose orders haven't yet shipped.
- DThe customer numbers of all customers who haven't placed an order are displayed.
103Which operator is used to process a correlated subquery?
- AEXISTS
- BIN
- CLINK
- DMERGE
Información
- Descripción
- Some Questions will be used from Midterm and other homework for the final
- Autor
- Brad Gustafson
- Idioma
- English
- Visitas
- 2
- Etiquetas
- Valoración
- Aún sin valoraciones Valora este test