db2.4.1

Vocabulary, write the correct function/vocabulary word for each of the following (hint: they are all in the slides):

A.Dummy table used to view results from functions and calculations

B.The arrangement of data for storage or display.

C.Converts alpha character values to uppercase for the first letter of each word, all other letters in lowercase.

D.Functions that accept character data as input and can return both character and numeric values.

E.Removes all specified characters from either the beginning or the ending of a string.

F.A symbol that represents a quantity or a relationship between quantities

G.Functions that operate on single rows only and return one result per row

H.Converts alpha characters to upper case

I.Raw data entered into the computer

J.Concatenates the first character value to the second character value; equivalent to concatenation operator (||).

K.Data that is processed into information

L.Converts alpha character values to lowercase.

M.Pads the left side of a character, resulting in a right-justified value

N.Returns specific characters from character value starting at a specific character position and going specified character positions long

O.Replaces a sequence of characters in a string with another set of characters.

P.Returns the numeric position of a named string.

Q.Returns the number of characters in the expression

R.Pads the right-hand side of a character, resulting in a left-justified value.

Submit SQL statements that will answer the following questions

  1. Using the three separate words “Oracle,” “Internet,” and “Academy,” use one command to produce the following output:
The Best Class
Oracle Internet Academy
  1. Use the string “Oracle Internet Academy” to produce the following output(“The Net” is a column alias):
The Net
net
  1. What is the length of the string “Oracle Internet Academy”?

  2. What’s the position of “I” in “Oracle Internet Academy”?

  3. Starting with the string “Oracle Internet Academy”, pad the string to create

****Oracle****Internet****Academy****

  1. Using the string ‘Oracle Internet Academy’, produce the output shown using the REPLACE function.
The Best Class
Oracle 2016-2017 Academy
  1. List the order date and the order total from the Global Fast Foods F_ORDERS table. Name the order total as TOTAL, and fill in the empty spaces to the left of the order total with $.

  2. Write a query that will output a column called “ADDRESS” which has the following information: ZOE TWEE 1009 OLIVER AVENUE BOSTON, MA 12889. Use the Global Fast Foods F_CUSTOMERS table.

  3. Write a query to return the first character of the first name concatenated to the last_name, the salary and the department id for employees working in department 20. Give the first expression an alias of Name. Use the EMPLOYEES table.

results for ""

    No results matching ""