Your database stores telephone numbers. Each telephone number is stored as an integer. You must format the telephone number to print on a report in thefollowing format:(999) 999-9999You have selected the phone number into a local variable as follows:DECLARE @PhoneNumber int Which statement will correctly format the number?
A. SELECT 'Phone Number' = ‘(‘ + SUBSTRING(CONVERT(varchar(10),@PhoneNumber),3,0) + ‘)‘ + SUBSTRING(CONVERT(varchar(10), @PhoneNurnber),3,3)+‘-‘ + SUBSTRING(CONVERT(varchar(10), @PhoneNumber),4,6)
B. SELECT 'Phone Number' = ‘(‘ + SUBSTRING(CONVERT(varchar(10),@PhoneNuwber),3,1)+ ‘)‘ + SUBSTRING(CONVERT(varcher(10), @PhoneNumber),3,4)+ ‘-‘ +SUBSTRING(CONVERT(varchar(10), @PhoneMumber),4,7)
C. SELECT 'Phone Number' = ‘(‘ + SUBSTRING(CONVERT(varchar(10),@PhoneNumber),0,3) + ‘)‘ + SUBSTRING(CONVERT(varchar(10), @PhoneNumber),3,3)+‘-‘ + SUBSTRING(CONVERT(varchar(10), @PhoneNurtiber),6,4)
D. SELECT 'Phone Number' = ‘(‘ + SUBSTRING(CONVERT(varchar(10),@PhoneNumber),1,3) + ‘)‘ + SUBSTRING(CONVERT(varchar(10), @PhoneNumber),4,3)+'-' + SUBSTRING(CONVERT(varchar(10), @PhoneNumber),7,4)