Quiz
Oracle Vengence
Erstelle ein kostenloses Konto, um dieses Quiz zu beenden
Speichere deinen Fortschritt und sieh dir dein Endergebnis an.
oder mit deiner E-Mail registrieren
Schon ein Konto? Anmelden
Fragen in diesem Quiz (20)
1The PRODUCTS table has these columns:
PRODUCT_ID NUMBER(4)
PRODUCT_NAME VARCHAR2(45)
PRICE NUMBER(8, 2)
Evaluate this SQL statement:
SELECT *
FROM PRODUCTS
ORDER BY price, product_name;
What is true about the SQL statement?- AThe results are not sorted.
- BThe results are sorted numerically.
- CThe results are sorted alphabetically.
- DThe results are sorted numerically and then alphabetically.
2Examine the structure and data in the PRICE_LIST table:
Name . Null . Type
———————-
PROD_ID . NOT NULL . NUMBER(3)
PROD_PRICE . VARCHAR2(10)
PROD_ID PROD_PRICE
———————-
100 $234.55
101 $6,509.75
102 $1,234
You plan to give a discount of 25% on the product price and need to display the discount amount in the same format as the PROD_PRICE.
Which SQL statement would give the required result?- ASELECT TO_CHAR(prod_price* .25, ‘$99, 999.99’) FROM PRICE_LIST;
- BSELECT TO_CHAR(TO_NUMBER(prod_price)* .25, ‘$99, 999.00’) FROM PRICE_LIST;
- CSELECT TO_CHAR(TO_NUMBER(prod_price, ‘$99, 999.99’)* .25, ‘$99, 999.00’) FROM PRICE_LIST;
- DSELECT TO_NUMBER(TO_NUMBER(prod_price, ‘$99, 999.99’)* .25, ‘$99, 999.00’) FROM PRICE_LIST;
3Which statement successfully adds a new column, ORDER_DATE, to the table ORDERS?
- AALTER TABLE ORDERS ADD COLUMN ORDER_DATE DATE;
- BALTER TABLE ORDERS ADD ORDER_DATE (DATE);
- CALTER TABLE ORDERS ADD ORDER_DATE DATE;
- DALTER TABLE ORDERS NEW COLUMN ORDER_DATE TYPE DATE;
4You want to display each project’s start date as the day, week, number, and year. Which statement will give output like the following?
Tuesday Week 23, 2008- ASELECT proj_id, TO_CHAR(start_date, 'DOW Week WOY YYYY') FROM projects;
- BSELECT proj_id, TO_CHAR(start_date,'Day'||' Week'||' WOY, YYYY') FROM projects;
- CSELECT proj_id, TO_CHAR(start_date, 'Day" Week" WW, YYYY') FROM projects;
- DSELECT proj_id, TO_CHAR(start_date, 'Day Week# , YYYY') FROM projects;
- EYou can’t calculate week numbers with Oracle.
5You need to calculate the number of days from 1st January 2007 till date . Dates are stored in the default format of dd-mon-rr.
Which two SQL statements would give the required output?
(Choose two.)- ASELECT SYSDATE – TO_DATE(’01-JANUARY-2007′) FROM DUAL;
- BSELECT TO_CHAR(SYSDATE, ‘DD-MON-YYYY’) – ’01-JAN-2007′ FROM DUAL;
- CSELECT SYSDATE – ’01-JAN-2007′ FROM DUAL;
- DSELECT SYSDATE – TO_DATE(’01/JANUARY/2007′) FROM DUAL;
- ESELECT TO_DATE(SYSDATE, ‘DD/MONTH/YYYY’) – ’01/JANUARY/2007′ FROM DUAL;
6What is the default precision for fractional seconds in a TIMESTAMP datatype column?
- A0
- B9
- C2
- D6
7Examine this statement:
SELECT student_id, gpa FROM student_grades WHERE gpa > &&value; You run the statement once, and when prompted you enter a value of 2.0. A report is produced.
What happens when you run the statement a second time?- AAn error is returned.
- BA report is produced that matches the first report produced.
- CYou are asked whether you want a new value or if you want to run the report based on the previous value.
- DYou are prompted to enter a new value.
8he EMPLOYEES table has EMPLOYEE_ID, DEPARTMENT_ID, and FULL_NAME columns. The DEPARTMENTS table has DEPARTMENT_ID and DEPARTMENT_NAME columns.
Which two of the following queries return the department ID, name, and employee name, listing department names even if there is no employee assigned to that department?- ASELECT d.department_id, d.department_name, e.full_name FROM departments d LEFT OUTER JOIN employees e ON (d.department_id = e.department_id);
- BSELECT department_id, department_name, full_name FROM departments NATURAL LEFT JOIN employees;
- CSELECT d.department_id, d.department_name, e.full_name FROM departments d NATURAL LEFT OUTER JOIN employees e;
- DSELECT d.department_id, d.department_name, e.full_name FROM departments d LEFT OUTER JOIN employees e USING (d.department_id);
9Which two operators are not allowed when using an outer join operator in the query?
- AAND
- BIN
- COR
- D=
10The account table contains these columns:
ACCOUNT_ID NUMBER(12)
NEW_BALANCE NUMBER(7,2)
PREV_BALANCE NUMBER(7,2)
FINANCE_CHARGE NUMBER(7,2)
You need to create a single SELECT statement to accomplish these requirements:
- Display accounts that have a new balance that is less than the previous balance.
- Display accounts that have a finance charge that is less than $25.00.
- Display accounts that have no finance charge.
Evaluate this statement:
SELECT account_id
FROM account
WHERE new_balance < prev_balance
AND NVL(finance_charge, 0) < 25;
How many of the three requirements will this SELECT statement accomplish?- Aone of the requirements
- Btwo of the requirements
- Cnone of the requirements
- Dall of the requirements
11What are the distinguishing characteristics of a scalar subquery?
(Choose two correct answers.)- AA scalar subquery cannot be used as a correlated subquery.
- BA scalar subquery returns one column.
- CA scalar subquery returns one row.
- DA scalar subquery cannot be used in the SELECT LIST of the parent query.
12Which two statements are true regarding single row functions?
- ATRUNC: can be used with number and date values
- BMOD: returns the quotient of a division
- CTRIM: can be used to remove all the occurrences of a character from a string
- DINSTR: can be used to find only the first occurrence of a character in a string
- ESYSDATE: returns the database server current date and time
13When a COMMIT is issued, what will happen?
(Choose the best answer.)- AAll the change vectors that make up the transaction are written to disk.
- BDBWn writes the change blocks to disk
- CThe undo data is deleted so that the changes can no longer be rolled back.
- DLGWR writes the log buffer to disk.
14You need to create a table with the following column specifications:
1. Employee ID (numeric data type) for each employee
2. Employee Name (character data type) that stores the employee name
3. Hire date, which stores the date of joining the organization for each employee
4. Status (character data type), that contains the value 'active' if no data is entered
5. Resume (character large object [CLOB] data type),
which contains the resume submitted by the employee Which is the correct syntax to create this table?- ACREATE TABLE EMP_1(
emp_id NUMBER(4),
emp_name VARCHAR2 (25),
start_date DATE,
e_status VARCHAR2(10) DEFAULT 'ACTIVE',
resume CLOB(200)
); - BCREATE TABLE 1_EMP(
emp_id NUMBER(4),
emp_name VARCHAR2 (25),
start_date DATE,
e_status VARCHAR2(10) DEFAULT 'ACTIVE',
resume CLOB
); - CCREATE TABLE EMP_1(
emp_id NUMBER(4),
emp_name VARCHAR2 (25),
start_date DATE,
e_status VARCHAR2(10) DEFAULT "ACTIVE",
resume CLOB
); - DCREATE TABLE EMP_1(
emp_id NUMBER(4),
emp_name VARCHAR2 (25),
start_date DATE,
e_status VARCHAR2(10) DEFAULT 'ACTIVE',
resume CLOB
);
- ACREATE TABLE EMP_1(
15The LRU algorithm is used to manage what part of the Oracle architecture?
- AThe data file that stores the least amount of information and will need the least frequent backup
- BThe tables that users rarely access so that they can be moved to a less active tablespace
- CThe shared pool and database buffer cache portions of the SGA
- DUsers who log on to the database infrequently and may be candidates for being dropped
16Which statement is true regarding the INTERSECT operator?
- AIt ignores NULL values
- BThe number of columns and data types must be identical for all SELECT statements in the query
- CThe names of columns in all SELECT statements must be identical
- DReversing the order of the intersected tables the result
17Which statement will remove the column UPDATE_DT from the table STATE?
- AALTER TABLE STATE DROP COLUMN UPDATE_DT;
- BALTER TABLE STATE REMOVE COLUMN UPDATE_DT;
- CDROP COLUMN UPDATE_DT FROM STATE;
- DALTER TABLE STATE SET UNUSED COLUMN UPDATE_DT;
- EYou cannot drop a column from the table.
18After describing the EMPLOYEES table, you discover that the SALARY column has a data type of NUMBER(8,2). Which SALARY values will not be permitted in this column?
(Choose the best answers.)- ASALARY=12345678
- BSALARY=123456.78
- CSALARY=1234567.8
- DSALARY=123456
- ESALARY=12.34
19Examine the structure of the INVOICE table:
CREATE TABLE invoice(
inv_no NUMBER(3) NOT NULL,
inv_date DATE,
inv_amt NUMBER(10, 2)
);
Which two SQL statements would execute successfully?
(Choose two.)- ASELECT inv_no, NVL2(inv_date, ‘Pending’, ‘Incomplete’)
FROM invoice; - BSELECT inv_no, NVL2(inv_amt, inv_date, ‘Not Available’)
FROM invoice; - CSELECT inv_no, NVL2(inv_date, sysdate-inv_date, sysdate)
FROM invoice; - DSELECT inv_no, NVL2(inv_amt, inv_amt*.25, ‘Not Available’)
FROM invoice;``1
- ASELECT inv_no, NVL2(inv_date, ‘Pending’, ‘Incomplete’)
20If you suspect that undo generation is a performance issue, what can you do to reduce the amount of undo data generated?
(Choose the best answer.)- AConvert from use of rollback segments to automatic undo management.
- BThere is nothing you can do because all DML statements must generate undo.
- CReduce the size of the undo segments.
- DSet the UNDO_MANAGEMENT parameter to NONE.
Informationen
- Beschreibung
- Quiz am Oracle Vengence, erstellt von Brandon Gagon am 23/04/2019.
- Autor
- Brandon Gagon
- Sprache
- English
- Aufrufe
- 11
- Bewertung
- Noch keine Bewertungen Bewerte dieses Quiz