SQL Functions   «Prev 

Combining SQL Functions - Exercise

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

Combining scalar functions

Objective: Return three calculated columns from one table without changing the stored values.

Assume MyTable has these character columns. The row is sample data; the query must work for every row.

MyLastNameMyFirstNameMyAddressMyState
SmithALICE12 Oak StCA
  1. Return MyLastName in uppercase.
  2. Return MyFirstName in lowercase.
  3. Return the character length of MyAddress.
  4. Name the outputs Last Name, First Name, and Addr Length.

Predict the output for the sample row. Explain whether this SELECT changes the original names.

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.