Day 4
Quiz
1: | Which function capitalizes the first letter of a character string and makes the rest lowercase? |
A1: | INITCAP. |
2: | Which functions are also known by the name group functions? |
A2: | Group functions and aggregate functions are the same thing. |
3: | Will this query work?
SQL> SELECT COUNT(LASTNAME) FROM CHARACTERS;
|
A3: | Yes, it will return the total of rows. |
4: | How about this one?
SQL> SELECT SUM(LASTNAME) FROM CHARACTERS;
|
A4: | No, the query won't work because LASTNAME is a character field. |
5: | Assuming that they are separate columns, which function(s) would splice FIRSTNAME and LASTNAME together? |
A5: | The CONCAT function and the || symbol. |
6: | What does the answer 6 mean from the following SELECT?
SQL> SELECT COUNT(*) FROM TEAMSTATS;
COUNT(*)
|
A6: | 6 is ... |
Get Sams Teach Yourself SQL in 21 Days, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.