Using DECODE, write a query that checks the phone number of students. If the area code is 212, remove it. If it is anything else., put a 1- in front of the phone number. Display the student name and the phone number. If they have no phone number, display “No Phone”.
What will be an ideal response?
```
SELECT first_name||' '||last_name Student,
DECODE(SUBSTR(phone,1,3),'212',
SUBSTR(phone,5),
null, 'No phone',
'1-'||phone) Phone
FROM student```
You might also like to view...
When reviewing a document, you can make general observations by inserting a(n) ________
A) note B) comment C) annotation D) marker
Windows Server Backup can perform a restore operation in which restored objects will be propagated to other domain controllers and not overwritten at AD DS replication time. This is called a(n) __________________
a. Nonauthoritative restore b. Authoritative restore c. Full server recovery d. None of the above.
?A(n) ____________________ is a large surge of data that's transmitted for a short period of time.
Fill in the blank(s) with the appropriate word(s).
Pseudo code is written in the following language:
a. Basic b. Machine language c. Java d. English e. None of these