Quiz
QUIZ 4
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (15)
1Which query selects the first names of the DJ On Demand clients who have a first name beginning with "A"?
- ASELECT UPPER(first_name)
FROM d_clients
WHERE first_name LIKE '%a%' - BSELECT UPPER(first_name)
FROM d_clients
WHERE first_name LIKE 'a%' - CSELECT UPPER(first_name)
FROM d_clients
WHERE first_name LIKE %a% - DSELECT UPPER(first_name)
FROM d_clients
WHERE LOWER(first_name) LIKE 'a%'
- ASELECT UPPER(first_name)
2What will the following SQL statemtent display?
SELECT last_name, LPAD(salary, 15, '$')SALARY
FROM employees;- AThe query will result in an error: "ORA-00923: FROM keyword not found where expected."
- BThe last name of employees that have a salary that includes a $ in the value, size of 15 and the column labeled SALARY.
- CThe last name and salary for all employees with the format of the salary 15 characters long, left-padded with the $ and the column labeled SALARY.
- DThe last name and the format of the salary limited to 15 digits to the left of the decimal and the column labeled SALARY.
3Which query would return a user password combining the ID of an employee and the first 4 digits of the last name?
- ASELECT CONCAT (employee_id, INSTR(last_name,4,1))
AS "User Passwords"
FROM employees - BSELECT CONCAT (employee_id, SUBSTR(last_name,4,1))
AS "User Passwords"
FROM employees - CSELECT CONCAT (employee_id, INSTR(last_name,1,4))
AS "User Passwords"
FROM employees - DSELECT CONCAT (employee_id, SUBSTR(last_name,1,4))
AS "User Passwords"
FROM employees
- ASELECT CONCAT (employee_id, INSTR(last_name,4,1))
4Which of the following SQL statements would correctly return a song title identified in the database as "All These Years"?
- AWHERE title IN('All','These','Years');
- BWHERE title LIKE INITCAP('%all these years');
- CWHERE title LIKE LOWER('all these years');
- DWHERE title CONTAINS 'Years';
5 Which of the following are types of SQL functions? (Choose two correct answers.)
- AColumn-Row Functions
- BMany-to-Many Functions
- CMulti-Row Functions
- DSingle-Row Functions
6You need to display the current year as a character value (for example: Two Thousand and One). Which element would you use?
- ARR
- BYEAR
- CYY
- DYYYY
7Evaluate this SELECT statement:
SELECT SYSDATE + 30
FROM dual;
Which value is returned by the query?- AThe current date plus 30 days.
- BNo value is returned because the SELECT statement generates an error.
- CThe current date plus 30 months.
- DThe current date plus 30 hours.
8You need to subtract three months from the current date. Which function should you use?
- ATO_DATE
- BADD_MONTHS
- CROUND
- DMONTHS_BETWEEN
9The EMPLOYEES table contains these columns:
LAST_NAME VARCHAR2(20)
FIRST_NAME VARCHAR2(20)
HIRE_DATE DATE
EVAL_MONTHS NUMBER(3)
Evaluate this SELECT statement:
SELECT hire_date + eval_months
FROM employees;
The values returned by this SELECT statement will be of which data type?- ADATETIME
- BINTEGER
- CNUMBER
- DDATE
10What is the result of the following query?
SELECT ADD_MONTHS ('11-Jan-1994',6)
FROM dual;- A11-Jul-1994
- B11-Jan-1995
- C17-Jul-1994
- D17-Jan-1994
11Which two functions can be used to manipulate number or date column values, but NOT character column values? (Choose two.)
- ATRUNC
- BCONCAT
- CRPAD
- DROUND
- EINSTR
12ROUND and TRUNC functions can be used with which of the following Datatypes?
- ADates and numbers
- BDates and characters
- CNumbers and characters
- DNone of the above
13What is the result of the following SQL Statement:
SELECT ROUND(45.923,-1)
FROM DUAL;- A46
- B45.9
- C50
- DNone of the above.
14Which number function may be used to determine if a value is odd or even?
- AMOD
- BROUND
- CTRUNC
- DBINARY
15The answer to the following script is 456. True or False?
SELECT TRUNC(ROUND(456.98))
FROM dual;- ATrue
- BFalse
Information
- Description
- Quiz on QUIZ 4, created by Claudia Piscociu on 14/01/2017.
- Author
- Claudia Piscociu
- Language
- English
- Views
- 12
- Rating
- No ratings yet Rate this quiz