Microsoft
70-433 · Question #133
You have a column named TelephoneNumber that stores numbers as varchar(20). You need to write a query that returns the first three characters of a telephone number. Which expression should you use?
The correct answer is A. LEFT(TelephoneNumber, 3). See the full explanation below for the reasoning.
Question
You have a column named TelephoneNumber that stores numbers as varchar(20). You need to write a query that returns the first three characters of a telephone number. Which expression should you use?
Options
- ALEFT(TelephoneNumber, 3)
- BSUBSTRING(TelephoneNumber, 3, 3)
- CSUBSTRING (TelephoneNumber, 3, 1)
- DCHARINDEX('[0-9][0-9][0-9]', TelephoneNumber, 3)
How the community answered
(43 responses)- A74% (32)
- B2% (1)
- C16% (7)
- D7% (3)
Community Discussion
No community discussion yet for this question.