-2

I want to add a column in Customers table. The name of the column which I want to add, is Phone_no. Now if I want to add the country code along with the Phone_no field , then what would be the data type of Phone_no ? e.g. the Phone_no is +918884560909 , Then what would be the data type of Phone_no field?

diya
  • 1
  • 3

3 Answers3

0

If you want to add the number with special symbol like +, then use varchar for it like:

varchar(20)
Mayank Pandeyz
  • 25,704
  • 4
  • 40
  • 59
0

If you prefer one field name it as varchar(expected_size). If you prefer two fields you can name one field as country code (varchar) and other as phone_no(number). Go through Oracle documentation for all available datatypes.

0

ALTER TABLE Customers ADD COLUMN Phone-no varchar(13);

You could just store number without +. In that case you could store number as bigint