.
None, because no input required
Both the substitution variables ''hiredate' and 'mgr_id'.
Only hiredate'
Only 'mgr_id'
DELETE orders o, order_items I WHERE o.order_id = i.order_id;
DELETE FROM orders WHERE (SELECT order_id FROM order_items);
DELETE orders WHERE order_total < 1000;
DELETE order_id FROM orders WHERE order_total < 1000;
SELECT NVL (TO CHAR(cust_credit_limit * .15), 'Not Available') "NEW CREDIT" FROM customers;
SELECT TO_CHAR (NVL(cust_credit_limit * .15), 'Not Available') "NEW CREDIT" FROM customers;
SELECT NVL(cust_credit_limit * .15), 'Not Available') "NEW CREDIT" FROM customers;
SELECT NVL(cust_credit_limit), 'Not Available') "NEW CREDIT" FROM customers;
It generates an error because multiple columns (SALARY, COMMISSION) cannot be specified together in an UPDATE statement.
It generates an error because a subquery cannot have a join condition in a UPDATE statement.
It executes successfully and gives the desired update
It executes successfully but does not give the desired update
Performance would improve in query 2 only if there are null values in the CUST_CREDIT_LIMIT column.
There would be no change in performance.
Performance would degrade in query 2.
Performance would improve in query 2.
The ERD must have a 1:M relationship between the STUDENTS and PROJECTS entities.
The ERD must have a M:M relationship between the STUDENTS and PROJECTS entities that must be resolved into 1:M relationships.
STUDENT_ID must be the primary key in the STUDENTS entity and foreign key in the PROJECTS entity.
PROJECT_ID must be the primary key in the PROJECTS entity and foreign key in the STUDENTS entity.
An associative table must be created with a composite key of STUDENT_ID and PROJECT_ID, which is the foreign key linked to the STUDENTS and PROJECTS entities.
It would not execute because the same column has been used in both sides of the AND logical operator to form the condition.
It would not execute because the entire WHERE clause condition is not enclosed within the parentheses.
It would execute and the output would display the desired result.
It would execute but the output would return no rows.
The outer query stops evaluating the result set of the inner query when the first value is found.
It is used to test whether the values retrieved by the inner query exist in the result of the outer query.
It is used to test whether the values retrieved by the outer query exist in the result set of the inner query.
The outer query continues evaluating the result set of the inner query until all the values in the result set are processed.
SELECT name, concat (address| | ','| |city| |', ', country) AS full_address, start_date, property_price, property_price*115/100 FROM stores WHERE MONTHS_BETWEEN (start_date, '01-JAN-2000')
SELECT name, concat (address| | ','| |city| |', ', country) AS full_address, start_date, property_price, property_price*115/100 FROM stores WHERE TO_NUMBER(start_date-TO_DATE('01-JAN-2000','DD-MON-RRRR'))
SELECT name, address||','||city||','||country AS full_address, start_date, property_price, property_price*115/100 FROM stores WHERE MONTHS_BETWEEN (start_date, TO_DATE('01-JAN-2000','DD-MON-RRRR'))
SELECT name, concat (address||','| |city| |', ', country) AS full_address, start_date, property_price, property_price*115/100 FROM stores WHERE MONTHS_BETWEEN (start_date, TO_DATE('01-JAN-2000','DD-MON-RRRR'))
The execution fails unless the numeral 3 in the ORDER BY clause is replaced by a column name.
Rows are displayed in the order that they are stored in the table only for the three rows with the lowest values in the key column.
Rows are displayed in the order that they are stored in the table only for the first three rows.
Rows are displayed sorted in ascending order of the values in the third column in the table.
When the BOOKS table is dropped, the BOOK_TRANSACTIONS table is dropped.
When the BOOKS table is dropped, all the rows in the BOOK_TRANSACTIONS table are deleted but the table structure is retained.
When a row in the BOOKS table is deleted, the rows in the BOOK_TRANSACTIONS table whose BOOK_ID matches that of the deleted row in the BOOKS table are also deleted.
When a value in the BOOKS.BOOK_ID column is deleted, the corresponding value is updated in the BOOKS_TRANSACTIONS.BOOK_ID column.
SELECT m.last_name "Manager", e.last_name "Employee" FROM employees m JOIN employees e ON m.employee_id = e.manager_id WHERE m.manager_id = 100;
SELECT m.last_name "Manager", e.last_name "Employee" FROM employees m JOIN employees e ON m.employee_id = e.manager_id WHERE e.manager_id = 100;
SELECT m.last_name "Manager", e.last_name "Employee" FROM employees m JOIN employees e ON e.employee_id = m.manager_id WHERE m.manager_id = 100;
SELECT m.last_name "Manager", e.last_name "Employee" FROM employees m JOIN employees e WHERE m.employee_id = e.manager_id and AND e.manager_id = 100
They can contain a subquery within a subquery.
They can return multiple columns as well as rows.
They cannot contain a subquery within a subquery.
They can return only one column but multiple rows.
They can contain group functions and GROUP BY and HAVING clauses.
They can contain group functions and the GROUP BY clause, but not the HAVING clause.
SELECT e.last_name, m.manager_id FROM employees e RIGHT OUTER JOIN employees m on (e.manager_id = m.employee_id) AND e.employee_id = 123;
SELECT e.last_name, m.manager_id FROM employees e RIGHT OUTER JOIN employees m on (e.employee_id = m.manager_id) WHERE e.employee_id = 123;
SELECT e.last_name, e.manager_id FROM employees e RIGHT OUTER JOIN employees m on (e.employee_id = m.employee_id) WHERE e.employee_id = 123;
SELECT m.last_name, e.manager_id FROM employees e LEFT OUTER JOIN employees m on (e.manager_id = m.manager_id) WHERE e.employee_id = 123;
Second normal form
First normal form
Third normal form
Fourth normal form
INTERSECT
UNION
PLUS
MINUS
SUBTRACT
After executing the ALTER TABLE command, you can add a new column called ORDER_DATE to the ORDERS table.
The ORDER_DATE column should be empty for the ALTER TABLE command to execute succsessfully.
ROLLBACK can be used to get back the ORDER_DATE column in the ORDERS table.
The DESCRIBE command would still display the ORDER_DATE column.
It would remain disabled and can be enabled only by dropping the foreign key constraint and recreating it.
It would remain disabled and has to be enabled manually using the ALTER TABLE command.
It would be automatically enabled and immediate.
It would be automatically enabled and deferred.
The minimum column width that can be specified for a VARCHAR2 data type column is one.
Only one LONG column can be used per table.
A TIMESTAMP data type column stores only time values with fractional seconds.
The BLOB data type column is used to store binary data in an operating system file.
The value for a CHAR data type column is blank-padded to the maximum defined column width.
Multiple columns or expressions can be compared between the main query and subquery.
Subqueries can contain ORDER BY but not the GROUP BY clause.
Main query and subquery can get data from different tables.
Subqueries can contain GROUP BY and ORDER BY clauses.
Main query and subquery must get data from the same tables.
Only one column or expression can be compared between the main query and subquery.
In a character sort, the values are case-sensitive.
NULL values are not considered at all by the sort operation.
Only those columns that are specified in the SELECT list can be used in the ORDER BY clause.
Numeric values are displayed from the maximum to the minimum value if they have decimal positions.
Adding a column constraint when inserting a row into a table
Adding a column with a default value when inserting a row into a table
Removing all data only from one single column on which a unique constraint is defined
Removing all data only from one single column on which a primary key constraint is defined
SELECT member_id AS MEMBER_ID, due_date AS DUE_DATE, $2 AS LATE_FEE FROM BOOKS_TRANSACTIONS;
SELECT member_id 'MEMBER ID', due_date 'DUE DATE', '$2 AS LATE FEE' FROM BOOKS_TRANSACTIONS;
SELECT member_id AS "MEMBER ID", due_date AS "DUE DATE", '$2' AS "LATE FEE" FROM BOOKS_TRANSACTIONS;
SELECT member_id AS "MEMBER ID", due_date AS "DUE DATE", $2 AS "LATE FEE" FROM BOOKS_TRANSACTIONS;
When a PL/SQL anonymous block is executed
When a DELETE statement is executed
When a ROLLBACK command is executed
When a data definition language (DDL) statement is executed
When a TRUNCATE statement is executed after the pending transaction
The ORDERS_MASTER table would contain the ORDER_IDs 1, 2, 3 and 4.
The ORDERS_MASTER table would contain the ORDER_IDs 1, 2 and 4.
The ORDERS_MASTER table would contain the ORDER_IDs 1, 2 and 3.
The ORDERS_MASTER table would contain the ORDER_IDs 1 and 2.
Use Quote (q) operator and delimiter to allow the use of single quotation mark in the literal character string.
Enclose the literal character string in the SELECT clause within the double quotation marks.
Do not enclose the character literal string in the SELECT clause within the single quotation marks.
Use escape character to negate the single quotation mark inside the literal character string in the SELECT clause.
ALTER TABLE orders MODIFY CONSTRAINT orders_cust_id_nn NOT NULL (customer_id);
ALTER TABLE orders ADD CONSTRAINT orders_cust_id_nn NOT NULL (customer_id);
ALTER TABLE orders MODIFY customer_id CONSTRAINT orders_cust_nn NOT NULL (customer_id);
ALTER TABLE orders ADD customer_id NUMBER(6)CONSTRAINT orders_cust_id_nn NOT NULL;
SELECT inv_no, NVL2(inv_date, 'Pending', 'Incomplete') FROM invoice;
SELECT inv_no, NVL2(inv_amt, inv_date, 'Not Available') FROM invoice;
SELECT inv_no, NVL2(inv_date, sysdate-inv_date, sysdate) FROM invoice;
SELECT inv_no, NVL2(inv_amt, inv_amt*.25, 'Not Available') FROM invoice;
A column can be dropped only if it does not contain any data.
A column can be dropped only if another column exists in the table.
A dropped column can be rolled back.
The column in a composite PRIMARY KEY with the CASCADE option can be dropped.
A parent key column in the table cannot be dropped.
SELECT COUNT (DISTINCT list_price) FROM product_information WHERE list_price is NULL
SELECT COUNT (NVL(list_price, 0)) FROM product_information WHERE list_price is NULL
SELECT COUNT (list_price) FROM product_information WHERE list_price i= NULL
SELECT COUNT (list_price) FROM product_information WHERE list_price is NULL
Displaying a date in a nondefault format
Finding the number of characters in an expression
Substituting a character string in a text expression with a specified string
Combining more than two columns or expressions into a single column in the output
PUBLIC should be replaced with specific usernames.
ALL should be replaced with a list of specific privileges.
WITH GRANT OPTION should be added to the statement.
Separate GRANT statements are required for ORDERS and ORDER_ITEMS tables.
The EXECUTION_DATETIME must be of INTERVAL DAY TO SECOND data type.
The EXECUTION_DATETIME must be of TIMESTAMP data type.
The EXECUTION_DATETIME must be of DATE data type.
The COMPONENT_ID must be of ROWID data type.
The COMPONENT_ID must be of VARCHAR2 data type.
The COMPONENT_ID column must be of CHAR data type.
In generates an error because rrrr should be replaced by rr in the format string.
It executes successfully but does not return the correct result.
It executes successfully and returns the correct result.
In generates an error because TO_CHAR should be replaced with TO_DATE.
In generates an error because fm and double quotation marks should not be used in the format string.
You can use column alias in the GROUP BY clause.
Using the WHERE clause after the GROUP BY clause excludes the rows after creating groups.
The GROUP BY clause is mandatory if you are using an aggregate function in the SELECT clause.
Using the WHERE clause before the GROUP BY clause excludes the rows before creating groups.
If the SELECT clause has an aggregate function, then those individual columns without an aggregate function in the SELECT clause should be included in the GROUP BY cause.
SELECT d.department_id, c.course_id FROM department_details d RIGHT OUTER JOIN course_details c ON (d.department_id=c. department_id);
SELECT d.department_id, c.course_id FROM department_details d LEFT OUTER JOIN course_details c ON (d.department_id=c. department_id);
SELECT d.department_id, c.course_id FROM course_details c LEFT OUTER JOIN department_details d ON (c.department_id=d. department_id);
SELECT d.department_id, c.course_id FROM department_details d RIGHT OUTER JOIN course_details c ON (c.department_id=d. department_id);
The table prefix is missing for the column names in the SELECT clause.
The NATURAL JOIN clause is missing the USING clause.
The DEPARTMENTS table is not used before the EMPLOYEES table in the FROM clause.
The EMPLOYEES and DEPARTMENTS tables have more than one column with the same column name and data type.
When the MAXVALUE limit for the sequence is reached, you can increase the MAXVALUE limit by using the ALTER SEQUENCE statement.
DELETE would remove a sequence from the database.
The numbers generated by a sequence can be used only for one table.
CURRVAL is used to refer to the last sequence number that has been generated.
When a database instance shuts down abnormally, the sequence numbers that have been cached but not used would be available once again when the database instance is restarted.
Finding the number of customers, in each city, whose credit limit is more than the average credit limit of all the customers
Finding the average credit limit of male customers residing in 'Tokyo' or 'Sydney'
Listing of customers who do not have a credit limit and were born before 1980
Finding the number of customers, in each city, who‟s marital status is 'married'.
Listing of those customers, whose credit limit is the same as the credit limit of customers residing in the city 'Tokyo'.
A set of Data Manipulation Language (DML) statements executed in a sequence ending with a SAVEPOINT forms a single transaction.
Each Data Definition Language (DDL) statement executed forms a single transaction.
A set of DDL statements executed in a sequence ending with a COMMIT forms a single transaction.
A combination of DDL and DML statements executed in a sequence ending with a COMMIT forms a single transaction.
It recovers only the table structure.
It recovers the table structure, data, and the indexes.
It recovers the table structure and data but not the related indexes.
It is not possible to recover the table structure, data, or the related indexes.
2, 1, 4, 3
4, 1, 2, 3
4, 2, 1, 3
2, 4, 1, 3
150
200
160
16
100
SELECT SUBSTR (cust_name, INSTR (cust_name, ' ')+1) FROM customers WHERE SUBSTR (cust_name, INSTR (cust_name, ' ')+1) LIKE INITCAP ('MC%');
SELECT SUBSTR (cust_name, INSTR (cust_name, ' ')+1) FROM customers WHERE INITCAP (SUBSTR(cust_name, INSTR (cust_name, ' ')+1)) = 'Mc';
SELECT SUBSTR (cust_name, INSTR (cust_name, ' ')+1) FROM customers WHERE INITCAP (SUBSTR(cust_name, INSTR (cust_name, ' ')+1)) LIKE 'Mc%';
SELECT SUBSTR (cust_name, INSTR (cust_name, ' ')+1) FROM customers WHERE INITCAP (SUBSTR(cust_name, INSTR (cust_name, ' ')+1)) = INITCAP 'MC%';
The NEW_SALES table would get created and all the NOT NULL constraints defined on the specified columns would be passed to the new table.
The NEW_SALES table would not get created because the DEFAULT value cannot be specified in the column definition.
The NEW_SALES table would not get created because the column names in the CREATE TABLE command and the SELECT clause do not match.
The NEW_SALES table would get created and all the FOREIGN KEY constraints defined on the specified columns would be passed to the new table.
The R_CONSTRAINT_NAME column gives the alternative name for the constraint.
In the second column, 'c' indicates a check constraint.
The STATUS column indicates whether the table is currently in use.
The column DELETE_RULE decides the state of the related rows in the child table when the corresponding row is deleted from the parent table.
They can be used on columns or expressions.
They can be passed as an argument to another group function.
They can be used only with a SQL statement that has the GROUP BY clause.
They can be used on only one column in the SELECT clause of a SQL statement.
They can be used along with the single-row function in the SELECT clause of a SQL statement.
The data dictionary is created and maintained by the database administrator.
The data dictionary views consists of joins of dictionary base tables and user-defined tables.
The usernames of all the users including the database administrators are stored in the data dictionary.
The USER_CONS_COLUMNS view should be queried to find the names of the columns to which a constraint applies.
Both USER_OBJECTS and CAT views provide the same information about all the objects that are owned by the user.
Views with the same name but different prefixes, such as DBA, ALL and USER, use the same base tables from the data dictionary.
It displays prod IDs in the promo with the lowest cost.
It displays prod IDs in the promos with the lowest cost in the same time interval.
T displays prod IDs in the promos with the highest cost in the same time interval.
It displays prod IDs in the promos which cost less than the highest cost in the same time interval.
UPDATE dept d SET city = ALL (SELECT city FROM locations l WHERE d.location_id = l.location_id);
UPDATE dept d SET city = (SELECT city FROM locations l) WHERE d.location_id = l.location_id;
UPDATE dept d SET city = ANY (SELECT city FROM locations l)
UPDATE dept d SET city = (SELECT city FROM locations l WHERE d.location_id = l.location_id);
Quiz Review Timeline +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.