SQL Functions   «Prev 

UPPER and LOWER Functions - Exercise

Database: Oracle AI Database 26ai. Write your answer using the table and column names supplied below.

Objective: Predict the results of UPPER and LOWER without modifying source data.

Assume Authors.State is a VARCHAR2 column containing the three values below.

State
ca
NY
NULL
SELECT UPPER(State) AS UpperState FROM Authors;
SELECT LOWER(State) AS LowerState FROM Authors;
  1. Give both calculated values for each source value.
  2. Explain what happens to NULL.
  3. State whether either query changes Authors.State.

Use the sample ASCII state abbreviations. Do not assume the same case-conversion rules for every writing system.

How to submit: Enter your SQL and reasoning, then select Submit to compare with the model solution. This is a self-assessment: the website does not connect to a database or execute your SQL.