
SQL Regular Expressions Quiz
Authored by Dinesh Kumar
Other
Professional Development
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What does REGEXP_LIKE(CustomerID, '^A') check?
CustomerID ends with 'A'
CustomerID contains 'A'
CustomerID starts with 'A'
Invalid syntax
Answer explanation
REGEXP_LIKE(CustomerID, '^A') checks if CustomerID starts with 'A'. The caret (^) indicates the start of the string, making 'CustomerID starts with 'A'' the correct choice.
2.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What does REGEXP_INSTR(Manager, '[aeiou]') return?
Count of vowels
Position of first vowel
TRUE/FALSE
Replaces vowels
Answer explanation
REGEXP_INSTR returns the position of the first occurrence of a pattern in a string. In this case, it finds the position of the first vowel in 'Manager', making 'Position of first vowel' the correct answer.
3.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What does this return: REGEXP_COUNT('Hello123', '[0-9]')?
0
3
1
NULL
Answer explanation
The function REGEXP_COUNT counts the number of matches for the regex '[0-9]' in the string 'Hello123'. There are three digits (1, 2, and 3), so it returns 3, making '3' the correct answer.
4.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which function extracts a substring using a regex pattern?
REGEXP_REPLACE
SUBSTRING
REGEXP_SUBSTR
INSTR
Answer explanation
The function REGEXP_SUBSTR is specifically designed to extract substrings that match a given regex pattern, making it the correct choice. Other options like REGEXP_REPLACE and INSTR serve different purposes.
5.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What does REGEXP_REPLACE(CustomerID, '[^A-Za-z]', '') do?
Replaces alphabetic characters
Removes all letters
Keeps only letters
Replaces NULL values
Answer explanation
REGEXP_REPLACE(CustomerID, '[^A-Za-z]', '') removes all non-alphabetic characters, effectively keeping only the letters. Therefore, the correct answer is 'Keeps only letters'.
6.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What is returned by REGEXP_LIKE('R-1001', '^[A-Z]-\d{4}$')?
TRUE
FALSE
Error
1001
Answer explanation
REGEXP_LIKE checks if 'R-1001' matches the pattern '^[A-Z]-\d{4}$'. The pattern requires a single uppercase letter, a hyphen, and exactly four digits. 'R-1001' meets these criteria, so it returns TRUE.
7.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What does [[:digit:]] represent?
Alphabetic characters
Letters and digits
Digits (0–9)
Punctuation
Answer explanation
The notation [[:digit:]] is a regular expression that specifically matches any digit from 0 to 9. Therefore, the correct answer is 'Digits (0–9)', as it accurately describes what this expression represents.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
Reliance
Quiz
•
Professional Development
10 questions
QIW2 Chapter 2
Quiz
•
Professional Development
15 questions
Agency OBX -Day 1 Quiz
Quiz
•
Professional Development
20 questions
แบบทดสอบ Security
Quiz
•
Professional Development
10 questions
Webinar Society 5.0
Quiz
•
Professional Development
10 questions
Quiz Kihajar STEM
Quiz
•
Professional Development
10 questions
KUIS COFFEE MORNING PT INDONESIA POWER
Quiz
•
Professional Development
15 questions
IMT TEAM BUILDING 2023
Quiz
•
Professional Development
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Other
15 questions
LOTE_SPN2 5WEEK3 Day 2 Itinerary
Quiz
•
Professional Development
20 questions
Black History Month Trivia Game #1
Quiz
•
Professional Development
20 questions
90s Cartoons
Quiz
•
Professional Development
42 questions
LOTE_SPN2 5WEEK2 Day 4 We They Actividad 3
Quiz
•
Professional Development
6 questions
Copy of G5_U6_L3_22-23
Lesson
•
KG - Professional Dev...
20 questions
Employability Skills
Quiz
•
Professional Development