sâmbătă, 4 decembrie 2010

final2

1.One-to-One relationships are transformed into Check Constraints in the tables created at either end of that relationship. False?
2. The Oracle Database can implement a many to many relationship. You simply create two foreign keys between the two tables. False?
3. Why would this table name NOT work in an Oracle database? this_year_end+next_year Plus sign + is not allowed in object names (*)
4. In a physical data model, an attribute becomes a _____________. Column (*)
5. In a physical data model, a relationship is represented as a combination of:
Primary Key or Unique Key (*)
Foreign Key (*)
6. Identify all of the incorrect statements that complete this sentence: A primary key is: (Choose three)
A single column that uniquely identifies each column in a table (*)
A set of columns in one table that uniquely identifies each row in another table (*)
Only one column that must be null (*)
7. The explanation below is a column integrity constraint:
A column must contain only values consistent with the defined data format of the column. True
8. Foreign keys must be null. False (*)
9. The explanation below is a User Defined integrity rule and must therefore be manually coded, the Database cannot enforce this rule automatically:
A primary key must be unique, and no part of the primary key can be null. False (*)
10. When translating an arc relationship to a physical design, you must turn the arc relationships into foreign keys. Assuming you are implementing an Exclusive Design, you must also create two Unique Key Constraints to ensure the Arc is implemented correctly. False?
11. Which of the following are reasons why you should consider using a Subtype Implementation?
Business functionality and business rules, access paths and frequency of access are all very different between subtypes. (*)
12. The _______ clause can be added to a SELECT statement to return a subset of the data. WHERE (*)
13. What command can be used to create a new row in a table in the database? INSERT (*)
14. You want to create a list of all albums that have been produced by the company. The list should include the title of the album, the artist’s name, and the date the album was released. The ALBUMS table includes the following columns:
ALB_TITLE VARCHAR2(150) NOT NULL
ALB_ARTIST VARCHAR2(150) NOT NULL
ALB_DATE DATE NOT NULL
Which statement can you use to retrieve the necessary information?
SELECT *
FROM albums;
(*)
15. In a SELECT clause, what is the result of 2 + 3 * 2? 8 (*)
16. Which SQL keyword specifies that an alias will be substituted for a column name in the output of a SQL query? AS (*)
17. When you use the SELECT clause to list one or two columns only from a table and no WHERE clause, which SQL capability is used? Projection only (*)
18. When listing columns in the SELECT list, what should you use to separate the columns? Commas (*)
19. In which clause of a SELECT statement would you specify the name of the table or tables being queried? The FROM clause (*)
20. The SELECT statement retrieves information from the database. In a SELECT statement, you can do all of the following EXCEPT:
Manipulation (*)
21. In a SELECT statement Additions are evaluated before Multiplications. False (*)
22. You cannot use computers unless you completely understand exactly how they work. False (*)
23. The STUDENT table contains these columns:
STUDENT_ID NUMBER(10) Primary Key
LAST_NAME VARCHAR2(25)
FIRST_NAME VARCHAR2(25)
MAIN_SUBJECT_ID NUMBER(3)
ADVISOR_ID NUMBER(5)
Evaluate this statement:
SELECT DISTINCT advisor_id, main_subject_id
FROM student;
Which statement is true?Each MAIN_SUBJECT_ID can be displayed more than once per ADVISOR_ID. (*)
24. You want to create a report that displays all employees who were hired before January 1, 2000 and whose annual salaries are greater than 50000.
The EMPLOYEES table contains these columns:
EMPLOYEE_ID VARCHAR2(5) PRIMARY KEY
LAST_NAME VARCHAR2(35)
HIREDATE DATE
DEPARTMENT_ID NUMBER(4)
The SALARY table contains these columns:
SALARYID VARCHAR2(5) PRIMARY KEY
SALARY NUMBER(5, 2)
EMPLOYEE_ID VARCHAR2(5) FOREIGN KEY
Which query should you issue?
SELECT last_name, hiredate, salary
FROM employees NATURAL JOIN salary
WHERE hiredate < ’01-jan-00′ AND salary > 50000;
(*)
25. 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 first names, last 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
WHERE hire_date BETWEEN ’01-MAR-00′ AND ’30-AUG-00′;
(*)
26. You need to display all the values in the EMAIL column that contains the underscore (_) character as part of that email address. The WHERE clause in your SELECT statement contains the LIKE operator. What must you include in the LIKE operator?
The ESCAPE option (\) (*)
27. Evaluate this SELECT statement:
SELECT *
FROM employees
WHERE department_id IN(10, 20, 30)
AND salary > 20000;
Which values would cause the logical condition to return TRUE?
DEPARTMENT_ID = 10 and SALARY = 20001 (*)
28. If the EMPLOYEES table has the following columns, and you want to write a SELECT statement to return the employee last name and department number for employee number 176, which of the following SQL statements should you use?
Name Type Length
EMPLOYEE_ID NUMBER 22
FIRST_NAME VARCHAR2 20
LAST_NAME VARCHAR2 25
EMAIL VARCHAR2 25
PHONE_NUMBER VARCHAR2 20
SALARY NUMBER 22
COMMISSION_PCT NUMBER 22
MANAGER_ID NUMBER 22
DEPARTMENT_ID NUMBER 22
SELECT last_name, department_id
FROM employees
WHERE employee_id = 176;
(*)
29. Evaluate this SELECT statement:
SELECT last_name, first_name, salary
FROM employees;
How will the heading for the SALARY column appear in the display by default in Oracle Application Express?
The heading will display as uppercase and centered. (*)
30. You need write a SELECT statement that should only return rows that contain 34, 46, or 48 for the DEPARTMENT_ID column. Which operator should you use in the WHERE clause to compare the DEPARTMENT_ID column to this specific list of values?
IN (*)
31. Which comparison operator searches for a specified character pattern?
LIKE (*)
32. What does the DISTINCT keyword do when it is used in a SELECT clause? Eliminates duplicate rows in the result (*)
33. Which symbol represents the not equal to condition?
!= (*)
34. Which of the following elements cannot be included in a WHERE clause? A column alias (*)
35. Where in a SQL statement can you not use arithmetic operators? FROM (*)
36. Which clause would you include in a SELECT statement to restrict the data returned to only the employees in department 10? WHERE (*)
37. Which of the following best describes the meaning of the LIKE operator?
Match a character pattern. (*)
38. The ORDER BY clause always comes last. True
39. Which of the following is TRUE regarding the logical AND operator?
TRUE AND FALSE return FALSE (*)
40. Which clause would you include in a SELECT statement to sort the rows returned by the LAST_NAME column? ORDER BY (*)
41. Which comparison condition means “Less Than or Equal To
“<=” (*)
42. You need to change the default sort order of the ORDER BY clause so that the data is displayed in reverse alphabetical order. Which keyword should you include in the ORDER BY clause? DESC (*)
43. What value will the following SQL statement return?
SELECT employee_id
FROM employees
WHERE employee_id BETWEEN 100 AND 150
OR employee_id IN(119, 175, 205)
AND (employee_id BETWEEN 150 AND 200);
100, 101, 102, 103, 104, 107, 124, 141, 142, 143, 144, 149 (*)
44. Which SELECT statement should you use to limit the display of product information to those products with a price of less than 50? SELECT product_id, product_name
FROM products
WHERE price < 50;
(*)
45. Evaluate this SELECT statement:
SELECT last_name, first_name, department_id, manager_id
FROM employees;
You need to sort data by manager id values and then alphabetically by employee last name and first name values. Which ORDER BY clause could you use?

46. Evaluate this SELECT statement:
SELECT *
FROM employees
WHERE salary > 30000
AND department_id = 10
OR email IS NOT NULL;
Which statement is true?
The AND condition will be evaluated before the OR condition. (*)
47. Evaluate this SELECT statement:
SELECT last_name, first_name, email
FROM employees
ORDER BY email;
If the EMAIL column contains null values, which statement is true?
Null email values will be displayed last in the result. (*)
48. Evaluate this SELECT statement:
SELECT *
FROM employees
WHERE department_id = 34
OR department_id = 45
OR department_id = 67;
Which operator is the equivalent of the OR conditions used in this SELECT statement?
IN (*)
49. The PLAYERS table contains these columns:
PLAYERS TABLE:
LAST_NAME VARCHAR2 (20)
FIRST_NAME VARCHAR2 (20)
SALARY NUMBER(8,2)
TEAM_ID NUMBER(4)
MANAGER_ID NUMBER(9)
POSITION_ID NUMBER(4)
You must display the player name, team id, and salary for players whose salary is in the range from 25000 through 100000 and whose team id is in the range of 1200 through 1500. The results must be sorted by team id from lowest to highest and then further sorted by salary from highest to lowest. Which statement should you use to display the desired result?
SELECT last_name, first_name, team_id, salary
FROM players
WHERE salary BETWEEN 25000 AND 100000
AND team_id BETWEEN 1200 AND 1500
ORDER BY team_id, salary DESC;
(*)
50. Evaluate this SQL statement:
SELECT e.employee_id, e.last_name, e.first_name, m.manager_id
FROM employees e, employees m
ORDER BY e.last_name, e.first_name
WHERE e.employee_id = m.manager_id;
This statement fails when executed. Which change will correct the problem?

Reorder the clauses in the query. (*)
4. When mapping supertypes, relationships at the supertype level transform as usual. Relationships at subtype level are implemented as foreign keys, but the foreign key columns all become mandatory.False
5. Which of the following are reasons why you should consider using a Subtype Implementation?
Business functionality and business rules, access paths and frequency of access are all very different between subtypes. (*)
6. The Oracle Database can implement a many to many relationship. You simply create two foreign keys between the two tables. False?
7. It is possible to implement non-transferability via a simple Foreign Key Relationship. False (*)
8. The text below is an example of what constraint type:
The value in the manager_id column of the EMPLOYEES table must match a value in the employee_id column in the EMPLOYEES table.
Referential integrity (*)
9. Entity integrity refers
Tables having Primary Keys, Foreign Keys, Unique Keys and Check constraints defined in the database. (*)
10. Identify all of the incorrect statements that complete this sentence: A primary key is: (Choose three
A single column that uniquely identifies each column in a table (*)
A set of columns in one table that uniquely identifies each row in another table (*)
Only one column that must be null (*)
11. The explanation below is a column integrity constraint:
A column must contain only values consistent with the defined data format of the column. True (*)
12. The DESCRIBE command returns all rows from a table. False (*)
13. What command can be used to create a new row in a table in the database? INSERT (*)
14. In a SQL statement, which clause specifies one or more columns to be returned by the query?
SELECT (*)
15. Which SQL keyword specifies that an alias will be substituted for a column name in the output of a SQL queryAS (*)
16. The SELECT statement retrieves information from the database. In a SELECT statement, you can do all of the following EXCEPT: Manipulation (*)
17. When listing columns in the SELECT list, what should you use to separate the columns? Commas (*)
18. In the default order of precedence, which operator would be evaluated first? Multiplications (*)
19. When you use the SELECT clause to list one or two columns only from a table and no WHERE clause, which SQL capability is used?
Projection only (*)
20. In which clause of a SELECT statement would you specify the name of the table or tables being queried? The FROM clause (*)
21. There is only one kind of software used by all computers. False (*)
22. In a SELECT statement Additions are evaluated before Multiplications. False (*)
24. You want to retrieve a list of customers whose last names begin with the letters Fr . Which symbol should you include in the WHERE clause of your SELECT statement to achieve the desired result?
% (*)
25. Evaluate this SELECT statement:
SELECT last_name, first_name, salary
FROM employees;
How will the heading for the SALARY column appear in the display by default in Oracle Application Express?The heading will display as uppercase and centered. (*)
26. Which SELECT statement will display both unique and non-unique combinations of the MANAGER_ID and DEPARTMENT_ID values from the EMPLOYEES table?
SELECT manager_id, department_id FROM employees; (*)
27. You need to display all the employees whose last name starts with the letters Sm . Which WHERE clause should you use? WHERE last_name LIKE ‘Sm%’ (*)
28. The STUDENT table contains these columns:
STUDENT_ID NUMBER(10) Primary Key
LAST_NAME VARCHAR2(25)
FIRST_NAME VARCHAR2(25)
MAIN_SUBJECT_ID NUMBER(3)
ADVISOR_ID NUMBER(5)
Evaluate this statement:
SELECT DISTINCT advisor_id, main_subject_id
FROM student;
Which statement is true?
Each MAIN_SUBJECT_ID can be displayed more than once per ADVISOR_ID. (*)
29. The EMPLOYEES table contains these columns:
EMPLOYEE_ID NUMBER(9) PrimaryKey
LAST_NAME VARCHAR2 (20)
FIRST_NAME VARCHAR2 (20)
DEPARTMENT_ID NUMBER(5) NOT NULL
MANAGER_ID NUMBER(9) NOT NULL
Evaluate these two SELECT statements:
1. SELECT DISTINCT employee_id, department_id, manager_id FROM employees;
2. SELECT employee_id, department_id, manager_id FROM employees;
Which of the following statements is true?
The two statements will display the same data. (*)
30. 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. False (*)
31. Which comparison condition would you use to select rows that match a character pattern? LIKE (*)
32. You need to display employees whose salary is in the range of 30000 and 50000. Which comparison operator should you use? BETWEEN…AND… (*)
33. What does the DISTINCT keyword do when it is used in a SELECT clause?
Eliminates duplicate rows in the result (*)
34. Which comparison operator searches for a specified character pattern? LIKE (*)
35. Where in a SQL statement can you not use arithmetic operators? FROM (*)
36. Which symbol represents the not equal to condition? != (*)
37. Evaluate this SQL statement:
SELECT e.employee_id, e.last_name, e.first_name, m.manager_id
FROM employees e, employees m
ORDER BY e.last_name, e.first_name
WHERE e.employee_id = m.manager_id;
This statement fails when executed. Which change will correct the problem?
Reorder the clauses in the query. (*)
38. The PLAYERS table contains these columns:
PLAYERS TABLE:
LAST_NAME VARCHAR2 (20)
FIRST_NAME VARCHAR2 (20)
SALARY NUMBER(8,2)
TEAM_ID NUMBER(4)
MANAGER_ID NUMBER(9)
POSITION_ID NUMBER(4)
You must display the player name, team id, and salary for players whose salary is in the range from 25000 through 100000 and whose team id is in the range of 1200 through 1500. The results must be sorted by team id from lowest to highest and then further sorted by salary from highest to lowest. Which statement should you use to display the desired result?
SELECT last_name, first_name, team_id, salary
FROM players
WHERE salary BETWEEN 25000 AND 100000
AND team_id BETWEEN 1200 AND 1500
ORDER BY team_id, salary DESC;
(*)
39. Which statement about the default sort order is true? The lowest numeric values are displayed last.
The earliest date values are displayed first. (*)
40. The ORDER BY clause always comes last. True or False? True (*)
41. Which logical operator returns TRUE if either condition is true? OR (*)
42. Which comparison condition means “Less Than or Equal To?”“<=” (*)
44. Which statement about the ORDER BY clause is true?
You can use a column alias in the ORDER BY clause. (*)
45. You query the database with this SQL statement:
SELECT price
FROM products
WHERE price IN(1, 25, 50, 250)
AND (price BETWEEN 25 AND 40 OR price > 50);
Which two values could the statement return? 25 (*)250 (*)
46. Evaluate this SQL statement:
SELECT product_id, product_name, price
FROM products
ORDER BY product_name, price;
What occurs when the statement is executed?
The results are sorted alphabetically and then numerically. (*)
47. Evaluate this SELECT statement:
SELECT last_name, first_name, email
FROM employees
ORDER BY email;
If the EMAIL column contains null values, which statement is true?
Null email values will be displayed last in the result. (*)
49. Which SELECT statement should you use to limit the display of product information to those products with a price of less than 50? SELECT product_id, product_name
FROM products
WHERE price < 50;
(*)
50. Evaluate this SELECT statement:
SELECT *
FROM employees
WHERE department_id = 34
OR department_id = 45
OR department_id = 67;
Which operator is the equivalent of the OR conditions used in this SELECT statement?

IN (*)
2. In an Oracle database, why would 1_TABLE not work as a table name?
Object names must not start with a number. They must begin with a letter (*)
3. The transformation from an ER diagram to a physical design involves changing terminology. Primary Unique Identifiers in the ER diagram become __________ and relationships become ____________. Primary keys, Foreign keys (*)
4. The text below is an example of what constraint type:
The value in the manager_id column of the EMPLOYEES table must match a value in the employee_id column in the EMPLOYEES table. Referential integrity (*)
5. A table must have at least one candidate key, as well as its primary key. False
6. The explanation below is a User Defined integrity rule and must therefore be manually coded, the Database cannot enforce this rule automatically:
A primary key must be unique, and no part of the primary key can be null. False
7. The explanation below is a column integrity constraint:
A column must contain only values consistent with the defined data format of the column. True
8. What do you create when you transform a many to many relationship from your ER diagram into a physical design?
Intersection table (*)
9. The Oracle Database can implement a many to many relationship. You simply create two foreign keys between the two tables. False
10. When mapping supertypes, relationships at the supertype level transform as usual. Relationships at subtype level are implemented as foreign keys, but the foreign key columns all become mandatory. False
12. What command can be used to create a new row in a table in the database?
INSERT (*)
14. All computers in the world speak the same languages, so you only need to learn one programming language – Oracle SQL. false
17. You query the database with this SQL statement:
SELECT * FROM students;
Why would you use this statement?
To view data (*)
18. In which clause of a SELECT statement would you specify the name of the table or tables being queried? The FROM clause (*)
19. Which statement best describes how arithmetic expressions are handled?
Division and multiplication operations are handled before subtraction and addition operations. (*)
21. You query the database with this SQL statement:
SELECT *
FROM transaction
WHERE product_id = 4569;
Which SQL SELECT statement capabilities are achieved when this statement is executed?
25. 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? IS NULL (*)
26. Where in a SQL statement can you not use arithmetic operators? FROM (*)
28. Which clause would you include in a SELECT statement to restrict the data returned to only the employees in department 10? WHERE (*)
29. 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 first names, last 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
WHERE hire_date BETWEEN ’01-MAR-00′ AND ’30-AUG-00′;
(*)
SELECT last_name, first_name, hire_date
FROM employees
WHERE hire_date BETWEEN ’30-AUG-00′ AND ’01-MAR-00′;
SELECT last_name, first_name, hire_date
FROM employees
GROUP BY hire_date >= ’01-MAR-00′ and hire_date = ’01-MAR-00′ and hire_date 20000;
Which values would cause the logical condition to return TRUE?
DEPARTMENT_ID = 10 and SALARY = 20001 (*)
34. You need write a SELECT statement that should only return rows that contain 34, 46, or 48 for the DEPARTMENT_ID column. Which operator should you use in the WHERE clause to compare the DEPARTMENT_ID column to this specific list of values? IN (*)
39. Which statement about the logical operators is true?
The order of operator precedence is NOT, AND, and OR. (*)
48. Evaluate this SQL statement:
SELECT product_id, product_name, price
FROM products
ORDER BY product_name, price;
What occurs when the statement is executed?
The results are sorted alphabetically and then numerically. (*)
50. Evaluate this SELECT statement:
SELECT *
FROM employees
WHERE salary > 30000
AND department_id = 10
OR email IS NOT NULL;
Which statement is true?
The AND condition will be evaluated before the OR condition. (*)
1. An “Arc Implementation” can be done just like any other Relationship – you simply add the required Foreign Keys. false
3. It is possible to implement non-transferability via a simple Foreign Key Relationship. false
4. The Oracle Database can implement a many to many relationship. You simply create two foreign keys between the two tables. false
5. The explanation below is a column integrity constraint:
A column must contain only values consistent with the defined data format of the column. True
6. A foreign key cannot refer to a primary key in the same table. false
7. The text below is an example of what constraint type:
If the number of BOOKS lent to a BORROWER in the LIBRARY exceeds 5, then we must send him/her a letter requesting the return of the BOOKS, which will require extra programming to enforce.
8. A table must have a primary key. false
11. In an Oracle database, why would 1_TABLE not work as a table name?
Object names must not start with a number. They must begin with a letter (*)
12. The _______ clause can be added to a SELECT statement to return a subset of the data. WHERE (*)
13. What command will return data from the database to you? SELECT (*)
14. There is only one kind of software used by all computers. false
15. In a SELECT statement Additions are evaluated before Multiplications. false
16. You query the database with this SQL statement:
SELECT *
FROM transaction
WHERE product_id = 4569;
Which SQL SELECT statement capabilities are achieved when this statement is executed? Selection only
17. You query the database with this SQL statement:
SELECT * FROM students;
Why would you use this statement?
To view data (*)
18. In a SQL statement, which clause specifies one or more columns to be returned by the query?
SELECT (*)
19. Which SQL statement will return an error?
SEL * FR sky; (*)
22. In the default order of precedence, which operator would be evaluated first?
Multiplications (*)
23. 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? IS NULL (*)
25. Where in a SQL statement can you not use arithmetic operators? FROM (*)
26. Which clause would you include in a SELECT statement to restrict the data returned to only the employees in department 10?
WHERE (*)
28. The Concatenation Operator does which of the following?
Links two or more columns or literals to form a single output column (*)
29. 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 first names, last 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
WHERE hire_date BETWEEN ’01-MAR-00′ AND ’30-AUG-00′;

2. The explanation below is a column integrity constraint:
A column must contain only values consistent with the defined data format of the column. false
3. The text below is an example of what constraint type:
If the number of BOOKS lent to a BORROWER in the LIBRARY exceeds 5, then we must send him/her a letter requesting the return of the BOOKS, which will require extra programming to enforce.
User-defined integrity (*)
8. When mapping supertypes, relationships at the supertype level transform as usual. Relationships at subtype level are implemented as foreign keys, but the foreign key columns all become mandatory. false
9. An “Arc Implementation” can be done just like any other Relationship – you simply add the required Foreign Keys. false
10. Many to many relationships are implemented via a structure called a: ________________
Intersection Table (*)
11. It is possible to implement non-transferability via a simple Foreign Key Relationship. false
19. The SELECT statement retrieves information from the database. In a SELECT statement, you can do all of the following EXCEPT:Manipulation (*)
21. In a SELECT statement Additions are evaluated before Multiplications. false
25. Which of the following elements cannot be included in a WHERE clause? A column alias (*)
26. Which operator is used to combine columns of character strings to other columns? || (*)
29. Evaluate this SELECT statement:
SELECT *
FROM employees
WHERE department_id IN(10, 20, 30)
AND salary > 20000;
Which values would cause the logical condition to return TRUE? DEPARTMENT_ID = 10 and SALARY = 20001 (*)
31. You need write a SELECT statement that should only return rows that contain 34, 46, or 48 for the DEPARTMENT_ID column. Which operator should you use in the WHERE clause to compare the DEPARTMENT_ID column to this specific list of values? IN (*)
32. You want to retrieve a list of customers whose last names begin with the letters Fr . Which symbol should you include in the WHERE clause of your SELECT statement to achieve the desired result? % (*)
33. You want to determine the orders that have been placed by customers who reside in Chicago. You write this partial SELECT statement:
SELECT orderid, orderdate, total
FROM orders;
What should you include in your SELECT statement to achieve the desired results?
WHERE city = ‘Chicago’; (*)
34. The EMPLOYEES table contains these columns:
LAST_NAME VARCHAR2(25)
FIRST_NAME VARCHAR2(25)
EMAIL VARCHAR2(50)
You are writing a SELECT statement to retrieve the names of employees that have an email address.
SELECT last_name||’, ‘||first_name “Employee Name”
FROM employees;
Which WHERE clause should you use to complete this statement? WHERE email IS NOT NULL; (*)
Incorrect. See Section 17
Section 18
37. The PLAYERS table contains these columns:
PLAYERS TABLE:
LAST_NAME VARCHAR2 (20)
FIRST_NAME VARCHAR2 (20)
SALARY NUMBER(8,2)
TEAM_ID NUMBER(4)
MANAGER_ID NUMBER(9)
POSITION_ID NUMBER(4)
You want to display all players’ names with position 6900 or greater. You want the players names to be displayed alphabetically by last name and then by first name. Which statement should you use to achieve the required results?
SELECT last_name, first_name
FROM players
WHERE position_id >= 6900
ORDER BY last_name, first_name;
(*)
40. Which statement about the logical operators is true?
The order of operator precedence is NOT, AND, and OR. (*)
41. From left to right, what is the correct order of Precedence? Arithmetic, Concatenation, Comparison, OR (*)
42. The ORDER BY clause always comes last. True
43. You need to change the default sort order of the ORDER BY clause so that the data is displayed in reverse alphabetical order. Which keyword should you include in the ORDER BY clause?
DESC (*)
48. You need to create a report to display all employees that were hired on or before January 1, 1996. The data should display in this format:
Employee Start Date and Salary
14837 – Smith 10-MAY-92 / 5000
SELECT employee_id ||' – '|| last_name "Employee",
hire_date ||' / '|| salary "Start Date and Salary"
FROM employees
WHERE hire_date <= '01-JAN-96';
(*)
49. Evaluate this SELECT statement:
SELECT last_name, first_name, salary
FROM employees;
How will the results of this query be sorted?The database will display the rows in whatever order it finds it in the database, so no particular order. (*)
50. Which SELECT statement should you use to limit the display of product information to those products with a price of less than 50
SELECT product_id, product_name
FROM products
WHERE price < 50;
(*)

4 comentarii:

  1. your blog are very important for me on behalf of my final exam,well done..i wish you all the best

    RăspundețiȘtergere
  2. What command can be used to show information about the structure of a table?
    ans: describe*

    RăspundețiȘtergere
  3. thank you yaa bro..
    nilai ane bagus bagus semuanya broo

    RăspundețiȘtergere
  4. There has certainly been some major developments in how the world interacts. I see the differnet readers have a wide variety of views. Need a staff for hire, pm.

    RăspundețiȘtergere