nerdexam
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)
  • A
    74% (32)
  • B
    2% (1)
  • C
    16% (7)
  • D
    7% (3)

Community Discussion

No community discussion yet for this question.

Full 70-433 Practice