Halaman

Wednesday, August 7, 2019

Answer Sections 2 Quiz Database Programming with SQL 2019 Learner - English



Section 2 

You need to display all the rows in the EMPLOYEES table that contain a null value in the DEPARTMENT_ID column. Which comparison operator should you use?      
                                               
                "= NULL"

                                               
                ISNULL


                                               
                IS NULL (*)

                                               
                NULL!

                                                                               
The structure of the table can be displayed with the _________ command:        

                                               
                Dis

                                               
                Desc and the Describe (*)

                                               
                Desc

                                               
                Describe


Which clause would you include in a SELECT statement to restrict the data returned to only the employees in department 10?  
                         
                                               
                SELECT

                                               
                WHERE (*)

                                               
                FROM

                                               
                IS

                                                                               
When using the LIKE condition to search for _ symbols, which character can you use as the default ESCAPE option?                                            
                                               
                \ (*)

                                               
                ^

                                               
                &

                                               
                %

                                                                               
Which symbol represents the not equal to condition?   
                                               
                ~

                                               
                +'

                                               
                != (*)

                                               
                #

Which example would limit the number of rows returned? 
                                                                               
                                               
                SELECT title FROM d_songs WHERE type_code = = 88;

                                               
                SELECT title FROM d_songs WHERE type_code = 88; (*)

                                               
                SELECT title FROM d_songs WHEN type_code = 88;

                                               
                SELECT title FROM d_songs WHEN type_code = = 88;

                                                                               
You want to retrieve a list of customers whose last names begin with the letters 'Fr' . Which keyword should you include in the WHERE clause of your SELECT statement to achieve the desired result?
                                                                               
                                               
                BETWEEN

                                               
                LIKE (*)

                                               
                AND

                                               
                IN

                                                                               
Which of the following would be returned by this SELECT statement:
SELECT last_name, salary
FROM employees
WHERE salary < 3500;
                                                           
                                               
               
LAST_NAME       SALARY
King       5000

                                               
               
LAST_NAME       SALARY
Rajas     3500

                                               
               
LAST_NAME       SALARY
Davies   3100
(*)


                                               
                All of the above

                                                                               
How can you write "not equal to" in the WHERE-clause?    
                                                                               
                                               
                !=

                                               
                ^=

                                               
                <>

                                               
                All of the above (*)

                                                                               
What will be the result of the SELECT statement and what will display?
SELECT last_name, salary, salary + 300
FROM employees;
                                                     
                                               
                Modify the salary column by adding 300 and only display the last name and the new salary.

                                               
                Display the last name and salary of all employees who have a salary greater than 300.

                                               
                Display the last name, salary, and the results of adding 300 to the salary of the first employee row

                                               
                Display the last name, salary, and the results of adding 300 to each salary for all the employees (*)

                                                               
Which of the following are examples of comparison operators used in the WHERE clause?           
                                                                               
                                               
                =, >, <, <=, >=, <>

                                               
                between ___ and ___

                                               
                in (..,..,.. )

                                               
                like

                                               
                is null

                                               
                All of the above (*)

                                                                               
The EMPLOYEES table includes these columns:
EMPLOYEE_ID NUMBER(4) NOT NULL
LAST_NAME VARCHAR2(15) NOT NULL
FIRST_NAME VARCHAR2(10) NOT NULL
HIRE_DATE DATE NOT NULL

You want to produce a report that provides the last names, first names, and hire dates of those employees who were hired between March 1, 2000, and August 30, 2000. Which statements can you issue to accomplish this task?
                                                                                
                                               
                SELECT last_name, first_name, hire_date
FROM employees
GROUP BY hire_date >= '01-Mar-2000' and hire_date <= '30- Aug-2000';

                                               
                SELECT last_name, first_name, hire_date
FROM employees
WHERE hire_date BETWEEN '30-Aug-2000' AND '01-Mar-2000';

                                               
                SELECT last_name, first_name, hire_date
FROM employees
WHERE hire_date BETWEEN '01-Mar-2000' AND '30-Aug-2000';
(*)


                                               
                SELECT last_name, first_name, hire_date
FROM employees
AND hire_date >= '01-Mar-2000' and hire_date <= '30-Aug-2000';

                                                                               
                                                               
If you write queries using the BETWEEN operator, it does not matter in what order you enter the values, i.e. BETWEEN low value AND high value will give the same result as BETWEEN high value and low value. True or False? 
                                                                               
                                               
                True

                                               
                False (*)

                                                                               
When using the "LIKE" operator, the % and _ symbols can be used to do a pattern-matching, wild card search. True or False?                       
                                               
                True (*)

                                               
                False

                                                                               
Which of the following WHERE clauses would not select the number 10?    
                                               
                WHERE hours IN (8,9,10)

                                               
                WHERE hours <>10 (*)

                                               
                WHERE hours <= 10

                                               
                WHERE hours BETWEEN 10 AND 20


1 comment:

  1. I read the articles and all the things here inside this blog .,I got many information that
    I really need

    ReplyDelete

Final Exam Java Programming 2019 Learner - English

Final Exam