SQL String Functions Basics Quiz

  • 10th Grade
Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Thames
T
Thames
Community Contributor
Quizzes Created: 6575 | Total Attempts: 67,424
| Questions: 16 | Updated: May 2, 2026
Please wait...
Question 1 / 17
🏆 Rank #--
0 %
0/100
Score 0/100

1. What does the UPPER() function do in SQL?

Explanation

The UPPER() function in SQL transforms all lowercase letters in a string to their uppercase equivalents. This is useful for standardizing text data, ensuring consistency in comparisons, and making data more readable. It does not alter spaces, count characters, or reverse text order.

Submit
Please wait...
About This Quiz
SQL String Functions Basics Quiz - Quiz

This SQL String Functions Basics Quiz evaluates your understanding of essential string manipulation functions in SQL. You'll test your knowledge of functions like UPPER, LOWER, SUBSTRING, LENGTH, and CONCAT that are fundamental to database querying and data processing. Master these core skills to write more efficient SQL queries and handle... see moretext data effectively. see less

2.

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2. Which function returns the number of characters in a string?

Explanation

LENGTH() is the function used in many programming languages and databases to determine the number of characters in a given string. It counts all characters, including spaces and punctuation, providing an accurate representation of the string's size. Other options like COUNT() and SIZE() do not specifically measure character count in strings.

Submit

3. What is the result of LOWER('DATABASE')?

Explanation

The LOWER function converts all uppercase letters in a string to their lowercase equivalents. In this case, applying LOWER to 'DATABASE' changes all the letters to lowercase, resulting in 'database'.

Submit

4. The SUBSTRING() function extracts ______ from a string.

Explanation

The SUBSTRING() function is used in programming and database queries to retrieve a specific portion of a string. By specifying the starting position and the length, it extracts a sequence of characters, allowing for manipulation and analysis of text data. This functionality is essential for tasks such as data formatting and parsing.

Submit

5. Which function combines two or more strings together?

Explanation

CONCAT() is a function used in various programming and database languages to concatenate, or join, two or more strings into a single string. It takes multiple string inputs and merges them without any additional characters, making it a straightforward choice for combining text.

Submit

6. What does TRIM() remove from a string?

Explanation

TRIM() is a function used in programming and databases to eliminate unwanted spaces from the beginning and end of a string. This ensures that the string is clean and formatted correctly, making it easier to work with in various applications, such as user input validation and data processing.

Submit

7. SELECT LENGTH('HELLO') returns ______ .

Explanation

The LENGTH function in SQL calculates the number of characters in a given string. In this case, 'HELLO' consists of five characters: H, E, L, L, and O. Therefore, when executing SELECT LENGTH('HELLO'), it returns 5, indicating the total character count.

Submit

8. The REPLACE() function substitutes ______ characters with new ones.

Explanation

The REPLACE() function is designed to search for specific characters or substrings within a given text and replace them with new characters or substrings. In this context, "old" refers to the original characters being replaced, highlighting the function's role in text manipulation by substituting outdated or unwanted elements with updated ones.

Submit

9. Which statement correctly uses CONCAT to join 'Hello' and 'World'?

Explanation

CONCAT is a standard SQL function used to concatenate two or more strings. In this case, SELECT CONCAT('Hello', 'World') correctly combines the two strings into one, resulting in 'HelloWorld'. The other options use incorrect functions that do not exist in SQL, making them invalid.

Submit

10. SUBSTRING('DATABASE', 1, 4) returns ______ .

Explanation

The SUBSTRING function extracts a portion of a string based on specified starting position and length. In this case, it starts at position 1 of the string 'DATABASE' and retrieves 4 characters, resulting in 'DATA'.

Submit

11. The INSTR() function finds the ______ of a character in a string.

Explanation

The INSTR() function is used in programming to determine the specific location or index of a given character within a string. By returning the position, it allows users to identify where the character first appears, enabling further manipulation or analysis of the string based on that information.

Submit

12. True or False: UPPER() and LOWER() modify the original data in the table.

Explanation

UPPER() and LOWER() are functions used to transform text data to uppercase or lowercase, respectively. However, these functions do not alter the original data stored in the database; they only return a modified version of the data for display or processing purposes. Therefore, the original data remains unchanged.

Submit

13. Which function returns the leftmost characters from a string?

Submit

14. SELECT RIGHT('SCHOOL', 4) returns ______ .

Submit

15. True or False: The LENGTH() function counts spaces as characters.

Submit

16. Which function converts the first letter of each word to uppercase?

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (16)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
What does the UPPER() function do in SQL?
Which function returns the number of characters in a string?
What is the result of LOWER('DATABASE')?
The SUBSTRING() function extracts ______ from a string.
Which function combines two or more strings together?
What does TRIM() remove from a string?
SELECT LENGTH('HELLO') returns ______ .
The REPLACE() function substitutes ______ characters with new ones.
Which statement correctly uses CONCAT to join 'Hello' and 'World'?
SUBSTRING('DATABASE', 1, 4) returns ______ .
The INSTR() function finds the ______ of a character in a string.
True or False: UPPER() and LOWER() modify the original data in the...
Which function returns the leftmost characters from a string?
SELECT RIGHT('SCHOOL', 4) returns ______ .
True or False: The LENGTH() function counts spaces as characters.
Which function converts the first letter of each word to uppercase?
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!