2 Replies - 272 Views - Last Post: 03 August 2013 - 08:24 AM

#1 VB_user  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 19-March 13

inquiry on data types

Posted 03 August 2013 - 03:42 AM

Hi, guys
just a quick question on data types..I have created a table with two field to hold the date and a telephone number the datatypes i have used is varchar for both.....this is because this it allows me to be able to read this data through a system am creating....the questions is from a DATABASE ADMINSTRATOR view point, is there any impact on using this data type as opposed to using DATE and NUMERIC as data types...
thanks
Is This A Good Question/Topic? 0
  • +

Replies To: inquiry on data types

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9049
  • View blog
  • Posts: 33,972
  • Joined: 12-June 08

Re: inquiry on data types

Posted 03 August 2013 - 06:57 AM

Sure.. in theory sorting, updating, etc. string on string compare is low and slow.. and preferably I would have dates in a datetime... then at least I can convert them to any visual format I see fit.
Was This Post Helpful? 0
  • +
  • -

#3 andrewsw  Icon User is offline

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3320
  • View blog
  • Posts: 11,227
  • Joined: 12-December 12

Re: inquiry on data types

Posted 03 August 2013 - 08:24 AM

Telephone numbers should remain as strings though:

  • The are not numbers (you never sum them), they are essentially codes;
  • You don't want to lose a leading 0;
  • Often they are stored with separators ( ) -
  • They would be very large numbers anyway!

This post has been edited by andrewsw: 03 August 2013 - 08:27 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1