Test: Quiz: Conversion Functions
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
1. A table has the following definition:
EMPLOYEES(
EMPLOYEE_ID NUMBER(6) NOT NULL,
LAST_NAME VARCHAR2(10) NOT NULL,
MANAGER_ID VARCHAR2(6))
and contains the following rows:
(1001, 'Bob Bevan', '200')
(200,'Natacha Hansen', null)
Will the following query work?
SELECT *
FROM employees
WHERE employee_id = manager_id;
Mark for Review
(1) Points
No, because the WHERE-clause will not find any matching data.
No, because the datatypes of ID and MANAGER are different.
Yes, Oracle will perform implicit datatype conversion. (*)
No. You will have to re-write the statement and perform explicit datatype conversion.
Correct Correct
2. Which statement will return the salary of e.g. 6000 from the Employees table in the following format $6000.00? Mark for Review
(1) Points
SELECT TO_CHAR(salary, '$99999.00') SALARY
FROM employees
(*)
SELECT TO_CHAR(salary, '99999.00') SALARY
FROM employees
SELECT TO_CHAR(salary, '$99999') SALARY
FROM employees
SELECT TO_CHAR(sal, '$99999.00') SALARY
FROM employees
Correct Correct
3. The following script will run successfully. True or False?
SELECT TO_CHAR(TO_DATE("25-DEC-04",'dd-MON-yy'))
FROM dual
Mark for Review
(1) Points
True
False (*)
Correct Correct
4. Which statement is true about SQL functions? Mark for Review
(1) Points
Functions can convert values or text to another data type.
Functions can round a number to a specified decimal place.
Functions can convert upper case characters to lower case characters.
a, b and c are true. (*)
None of the above statements are true.
Correct Correct
5. You need to display the HIRE_DATE values in this format:
25th of July 2002.
Which SELECT statement would you use?
Mark for Review
(1) Points
SELECT enroll_date(hire_date, 'DDspth "of" Month YYYY')
FROM employees;
SELECT TO_CHAR(hire_date, 'ddth "of" Month YYYY')
FROM employees;
(*)
SELECT TO_CHAR(hire_date, 'DDTH "of" Month YYYY')
FROM employees;
SELECT TO_CHAR(hire_date, 'DDspth 'of' Month RRRR')
FROM employees;
Correct Correct
6. Sysdate is 12-MAY-2004.
You need to store the following date: 7-DEC-89
Which statement about the date format for this value is true?
Mark for Review
(1) Points
Both the YY and RR date formats will interpret the year as 1989.
Both the YY and RR date formats will interpret the year as 2089.
The RR date format will interpret the year as 1989, and the YY date format will interpret the year as 2089. (*)
The RR date format will interpret the year as 2089, and the YY date format will interpret the year as 1989.
Correct Correct
( Vrei sa traduci ceva?Want to translate something? http://translate.google.ro/# )
miercuri, 24 februarie 2010
Quiz: Null Functions
Test: Quiz: Null Functions
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
1. With the following data in Employees (last_name, commission_pct, manager_id) what is the result of the following statement?
DATA:
King,null,null
Kochhar, null,100
Vargas, null, 124
Zlotkey,.2, 100
SELECT last_name, NVL2(commission_pct, manager_id, -1) comm
FROM employees ;
Mark for Review
(1) Points
King, -1
Kochhar, -1
Vargas, -1
Zlotkey, .2
Statement will fail.
King, -1
Kochhar, 100
Vargas, 124
Zlotkey, .2
King, -1
Kochhar, -1
Vargas, -1
Zlotkey, 100
(*)
Correct Correct
2. The following statement returns 0 (zero). True or False?
SELECT 121/NULL
FROM dual;
Mark for Review
(1) Points
True
False (*)
Correct Correct
3. Which function compares two expressions? Mark for Review
(1) Points
NVL
NULLIF (*)
NVL2
NULL
Correct Correct
4. If quantity is a number datatype, what is the result of this statement?
SELECT NVL(200/quantity, 'zero') FROM inventory;
Mark for Review
(1) Points
zero
ZERO
The statement fails (*)
Null
Correct Correct
5. Consider the following data in the Employees table:
(last_name, commission_pct, manager_id)
DATA:
King,null,null
Kochhar, null,100
Vargas, null, 124
Zlotkey,.2, 100
What is the result of the following statement:
SELECT last_name, COALESCE(commission_pct, manager_id, -1) comm
FROM employees ;
Mark for Review
(1) Points
Statement will fail
King, -1
Kochhar, 100
Vargas, 124
Zlotkey, .2
(*)
King, -1
Kochhar, 100
Vargas, 124
Zlotkey, 100
King, null
Kochhar, 100
Vargas, 124
Zlotkey, .2
Correct Correct
( Vrei sa traduci ceva?Want to translate something? http://translate.google.ro/# )
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
1. With the following data in Employees (last_name, commission_pct, manager_id) what is the result of the following statement?
DATA:
King,null,null
Kochhar, null,100
Vargas, null, 124
Zlotkey,.2, 100
SELECT last_name, NVL2(commission_pct, manager_id, -1) comm
FROM employees ;
Mark for Review
(1) Points
King, -1
Kochhar, -1
Vargas, -1
Zlotkey, .2
Statement will fail.
King, -1
Kochhar, 100
Vargas, 124
Zlotkey, .2
King, -1
Kochhar, -1
Vargas, -1
Zlotkey, 100
(*)
Correct Correct
2. The following statement returns 0 (zero). True or False?
SELECT 121/NULL
FROM dual;
Mark for Review
(1) Points
True
False (*)
Correct Correct
3. Which function compares two expressions? Mark for Review
(1) Points
NVL
NULLIF (*)
NVL2
NULL
Correct Correct
4. If quantity is a number datatype, what is the result of this statement?
SELECT NVL(200/quantity, 'zero') FROM inventory;
Mark for Review
(1) Points
zero
ZERO
The statement fails (*)
Null
Correct Correct
5. Consider the following data in the Employees table:
(last_name, commission_pct, manager_id)
DATA:
King,null,null
Kochhar, null,100
Vargas, null, 124
Zlotkey,.2, 100
What is the result of the following statement:
SELECT last_name, COALESCE(commission_pct, manager_id, -1) comm
FROM employees ;
Mark for Review
(1) Points
Statement will fail
King, -1
Kochhar, 100
Vargas, 124
Zlotkey, .2
(*)
King, -1
Kochhar, 100
Vargas, 124
Zlotkey, 100
King, null
Kochhar, 100
Vargas, 124
Zlotkey, .2
Correct Correct
( Vrei sa traduci ceva?Want to translate something? http://translate.google.ro/# )
Quiz: Number Functions
Test: Quiz: Number Functions
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
1. What is the result of the following SQL Statement:
SELECT ROUND(45.923,-1)
FROM DUAL;
Mark for Review
(1) Points
46
45.9
50 (*)
None of the above
Correct Correct
2. The answer to the following script is 456. True or False?
SELECT TRUNC(ROUND(456.98))
FROM dual
Mark for Review
(1) Points
True
False (*)
Correct Correct
3. ROUND and TRUNC functions can be used with which of the following Datatypes? Mark for Review
(1) Points
Dates and numbers (*)
Dates and characters
Numbers and characters
None of the above
Correct Correct
4. Which number function may be used to determine if a value is odd or even? Mark for Review
(1) Points
MOD (*)
TRUNC
ROUND
BINARY
Correct Correct
( Vrei sa traduci ceva?Want to translate something? http://translate.google.ro/# )
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
1. What is the result of the following SQL Statement:
SELECT ROUND(45.923,-1)
FROM DUAL;
Mark for Review
(1) Points
46
45.9
50 (*)
None of the above
Correct Correct
2. The answer to the following script is 456. True or False?
SELECT TRUNC(ROUND(456.98))
FROM dual
Mark for Review
(1) Points
True
False (*)
Correct Correct
3. ROUND and TRUNC functions can be used with which of the following Datatypes? Mark for Review
(1) Points
Dates and numbers (*)
Dates and characters
Numbers and characters
None of the above
Correct Correct
4. Which number function may be used to determine if a value is odd or even? Mark for Review
(1) Points
MOD (*)
TRUNC
ROUND
BINARY
Correct Correct
( Vrei sa traduci ceva?Want to translate something? http://translate.google.ro/# )
Quiz: Date Functions
Test: Quiz: Date Functions
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
1. What is the result of the following query?
SELECT ADD_MONTHS ('11-JAN-94',6)
FROM dual;
Mark for Review
(1) Points
1/17/2004
1/11/1995
7/11/1994 (*)
7/17/1994
Correct Correct
2. Round and Trunc can be used on Date datatypes. True or False? Mark for Review
(1) Points
True (*)
False
Correct Correct
3. What function would you use to return the highest date in a month? Mark for Review
(1) Points
FINAL_DAY
END_DAY
HIGHEST_DAY
LAST_DAY (*)
Correct Correct
4. Which query would return a whole number if the sysdate is 26-MAY-04? Mark for Review
(1) Points
SELECT TRUNC(MONTHS_BETWEEN(SYSDATE,'19-MAR-79') /12)
AS YEARS
FROM DUAL;
(*)
SELECT TRUNC(YEARS_BETWEEN(SYSDATE,'19-MAR-79') /12)
AS YEARS
FROM DUAL;
SELECT MONTHS_BETWEEN(SYSDATE,'19-MAR-79') /12
AS YEARS
FROM DUAL;
None of the above
Correct Correct
5. If hire_date has a value of '03-July-03', then what is the output from this code?
SELECT ROUND(hire_date, 'Year') FROM employees;
Mark for Review
(1) Points
01-JAN-04 (*)
01-JAN-03
01-JUL-03
01-AUG-03
Correct Correct
6. What is the result of the following query?
SELECT ADD_YEARS ('11-JAN-94',6)
FROM dual;
Mark for Review
(1) Points
This in not a valid SQL statement. (*)
7/11/1995
1/11/2000
7/11/2000
Correct Correct
( Vrei sa traduci ceva?Want to translate something? http://translate.google.ro/# )
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
1. What is the result of the following query?
SELECT ADD_MONTHS ('11-JAN-94',6)
FROM dual;
Mark for Review
(1) Points
1/17/2004
1/11/1995
7/11/1994 (*)
7/17/1994
Correct Correct
2. Round and Trunc can be used on Date datatypes. True or False? Mark for Review
(1) Points
True (*)
False
Correct Correct
3. What function would you use to return the highest date in a month? Mark for Review
(1) Points
FINAL_DAY
END_DAY
HIGHEST_DAY
LAST_DAY (*)
Correct Correct
4. Which query would return a whole number if the sysdate is 26-MAY-04? Mark for Review
(1) Points
SELECT TRUNC(MONTHS_BETWEEN(SYSDATE,'19-MAR-79') /12)
AS YEARS
FROM DUAL;
(*)
SELECT TRUNC(YEARS_BETWEEN(SYSDATE,'19-MAR-79') /12)
AS YEARS
FROM DUAL;
SELECT MONTHS_BETWEEN(SYSDATE,'19-MAR-79') /12
AS YEARS
FROM DUAL;
None of the above
Correct Correct
5. If hire_date has a value of '03-July-03', then what is the output from this code?
SELECT ROUND(hire_date, 'Year') FROM employees;
Mark for Review
(1) Points
01-JAN-04 (*)
01-JAN-03
01-JUL-03
01-AUG-03
Correct Correct
6. What is the result of the following query?
SELECT ADD_YEARS ('11-JAN-94',6)
FROM dual;
Mark for Review
(1) Points
This in not a valid SQL statement. (*)
7/11/1995
1/11/2000
7/11/2000
Correct Correct
( Vrei sa traduci ceva?Want to translate something? http://translate.google.ro/# )
Quiz: Case and Character Manipulation
Test: Quiz: Case and Character Manipulation
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
1. Which of the following SQL statements would correctly return a song title identified in the database as "All These Years"? Mark for Review
(1) Points
WHERE title CONTAINS 'Years';
WHERE title LIKE LOWER('all these years');
WHERE title IN('All','These','Years');
WHERE title LIKE INITCAP('%all these years'); (*)
Correct Correct
2. Which character manipulation function always returns a numerical value? Mark for Review
(1) Points
TRIM
LPAD
LENGTH (*)
SUBSTR
Correct Correct
3. Identify the output from the following SQL statement:
SELECT RPAD('SQL',6, '*')
FROM DUAL;
Mark for Review
(1) Points
******SQL
***SQL
SQL*** (*)
SQL******
Correct Correct
4. Which query selects the first names of the DJ On Demand clients who have a first name beginning with "A"? Mark for Review
(1) Points
SELECT UPPER(first_name)
FROM d_clients
WHERE first_name LIKE %a%
SELECT UPPER(first_name)
FROM d_clients v
WHERE first_name LIKE '%a%'
SELECT UPPER(first_name)
FROM d_clients
WHERE first_name LIKE 'a%'
SELECT UPPER(first_name)
FROM d_clients
WHERE LOWER(first_name) LIKE 'a%'
(*)
Correct Correct
5. Character functions accept character arguments and only return character values. True or False? Mark for Review
(1) Points
True
False (*)
Correct Correct
6. What does the following SQL SELECT statement return?
SELECT UPPER( SUBSTR('Database Programming', INSTR('Database Programming','P'),20))
FROM dual;
Mark for Review
(1) Points
Programming
PROGRAMMING (*)
Database
DATABASE
Correct Correct
7. Which query would return a user password combining the ID of an employee and the first 4 digits of the last name? Mark for Review
(1) Points
SELECT CONCAT (employee_id, SUBSTR(last_name,4,1))
AS "User Passwords"
FROM employees
SELECT CONCAT (employee_id, INSTR(last_name,4,1))
AS "User Passwords"
FROM employees
SELECT CONCAT (employee_id, INSTR(last_name,1,4))
AS "User Passwords"
FROM employees
SELECT CONCAT (employee_id, SUBSTR(last_name,1,4))
AS "User Passwords"
FROM employees
(*)
Correct Correct
8. Which of the following are types of SQL functions? (Choose two correct answers.) Mark for Review
(1) Points
(Choose all correct answers)
Multi-Row Functions (*)
Column-Row Functions
Single-Row Functions (*)
Many-to-Many Functions
Correct Correct
9. Single row functions may be used in ______, _______ and _______ clauses. (Choose two correct answers.) Mark for Review
(1) Points
(Choose all correct answers)
SELECT, FROM, ALWAYS
FROM, SELECT, ORDERS
WHERE, DECODE, ORDER BY (*)
SELECT, WHERE, ORDER BY (*)
Correct Correct
( Vrei sa traduci ceva?Want to translate something? http://translate.google.ro/# )
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
1. Which of the following SQL statements would correctly return a song title identified in the database as "All These Years"? Mark for Review
(1) Points
WHERE title CONTAINS 'Years';
WHERE title LIKE LOWER('all these years');
WHERE title IN('All','These','Years');
WHERE title LIKE INITCAP('%all these years'); (*)
Correct Correct
2. Which character manipulation function always returns a numerical value? Mark for Review
(1) Points
TRIM
LPAD
LENGTH (*)
SUBSTR
Correct Correct
3. Identify the output from the following SQL statement:
SELECT RPAD('SQL',6, '*')
FROM DUAL;
Mark for Review
(1) Points
******SQL
***SQL
SQL*** (*)
SQL******
Correct Correct
4. Which query selects the first names of the DJ On Demand clients who have a first name beginning with "A"? Mark for Review
(1) Points
SELECT UPPER(first_name)
FROM d_clients
WHERE first_name LIKE %a%
SELECT UPPER(first_name)
FROM d_clients v
WHERE first_name LIKE '%a%'
SELECT UPPER(first_name)
FROM d_clients
WHERE first_name LIKE 'a%'
SELECT UPPER(first_name)
FROM d_clients
WHERE LOWER(first_name) LIKE 'a%'
(*)
Correct Correct
5. Character functions accept character arguments and only return character values. True or False? Mark for Review
(1) Points
True
False (*)
Correct Correct
6. What does the following SQL SELECT statement return?
SELECT UPPER( SUBSTR('Database Programming', INSTR('Database Programming','P'),20))
FROM dual;
Mark for Review
(1) Points
Programming
PROGRAMMING (*)
Database
DATABASE
Correct Correct
7. Which query would return a user password combining the ID of an employee and the first 4 digits of the last name? Mark for Review
(1) Points
SELECT CONCAT (employee_id, SUBSTR(last_name,4,1))
AS "User Passwords"
FROM employees
SELECT CONCAT (employee_id, INSTR(last_name,4,1))
AS "User Passwords"
FROM employees
SELECT CONCAT (employee_id, INSTR(last_name,1,4))
AS "User Passwords"
FROM employees
SELECT CONCAT (employee_id, SUBSTR(last_name,1,4))
AS "User Passwords"
FROM employees
(*)
Correct Correct
8. Which of the following are types of SQL functions? (Choose two correct answers.) Mark for Review
(1) Points
(Choose all correct answers)
Multi-Row Functions (*)
Column-Row Functions
Single-Row Functions (*)
Many-to-Many Functions
Correct Correct
9. Single row functions may be used in ______, _______ and _______ clauses. (Choose two correct answers.) Mark for Review
(1) Points
(Choose all correct answers)
SELECT, FROM, ALWAYS
FROM, SELECT, ORDERS
WHERE, DECODE, ORDER BY (*)
SELECT, WHERE, ORDER BY (*)
Correct Correct
( Vrei sa traduci ceva?Want to translate something? http://translate.google.ro/# )
vineri, 5 februarie 2010
Nod32 Serials
Username:EAV-27298745
Password:pcx5vsjbmh
Username:EAV-27298749
Password:xtr68bvpte
Username:EAV-27298758
Password:aa42se22jk
Username:EAV-27298759
Password:esbaxdnha7
Username:EAV-27298760
Password:4k45xknbjr
Username:EAV-27298762
Password:jru362ddsf
Username:EAV-27298768
Password:e3evhprkax
Username:EAV-27298770
Password:dunbtt6dvp
Username:EAV-27299427
Password:ekr367vuer
Username:EAV-27299429
Password:8vr5bck7dv
Username:EAV-27299500
Password:b6xtu325fc
Password:pcx5vsjbmh
Username:EAV-27298749
Password:xtr68bvpte
Username:EAV-27298758
Password:aa42se22jk
Username:EAV-27298759
Password:esbaxdnha7
Username:EAV-27298760
Password:4k45xknbjr
Username:EAV-27298762
Password:jru362ddsf
Username:EAV-27298768
Password:e3evhprkax
Username:EAV-27298770
Password:dunbtt6dvp
Username:EAV-27299427
Password:ekr367vuer
Username:EAV-27299429
Password:8vr5bck7dv
Username:EAV-27299500
Password:b6xtu325fc
sâmbătă, 30 ianuarie 2010
Nod32 Serial
Username:EAV-25708812
Password:dpkm7n83f5
Username:EAV-25708814
Password:kckj3hjrhx
Username:EAV-25708816
Password:s3ketctejs
Username:EAV-25708818
Password:hd3rsvtt2n
Username:EAV-25708819
Password:cutfnx6cb4
Username:EAV-25708820
Password:p43nmr6j3h
Username:EAV-25708856
Password:bvsf7shvap
Username:EAV-25708857
Password:n42m6kh526
Username:EAV-25708862
Password:ek8ks35ps8
Username:EAV-25709705
Password:v6h4b77d8t
Username:EAV-25709706
Password:abr8a27kxa
Username:EAV-25709708
Password:f2p65tha25
Password:dpkm7n83f5
Username:EAV-25708814
Password:kckj3hjrhx
Username:EAV-25708816
Password:s3ketctejs
Username:EAV-25708818
Password:hd3rsvtt2n
Username:EAV-25708819
Password:cutfnx6cb4
Username:EAV-25708820
Password:p43nmr6j3h
Username:EAV-25708856
Password:bvsf7shvap
Username:EAV-25708857
Password:n42m6kh526
Username:EAV-25708862
Password:ek8ks35ps8
Username:EAV-25709705
Password:v6h4b77d8t
Username:EAV-25709706
Password:abr8a27kxa
Username:EAV-25709708
Password:f2p65tha25
Abonați-vă la:
Postări (Atom)