Wrox Programmer Forums
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 3rd, 2007, 09:39 AM
Registered User
 
Join Date: Feb 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL DATA TYPE

WHAT IS THE DATA TYPE FOR PHONE NUMBER. THE PHONE NUMBER e.g 96633655:) thank you
 
Old February 5th, 2007, 04:19 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

It is the way you wish to store. If you wish to store it hyphenated, then varchar/nvarchar is used. If just the numbers, then INT could be used.

cheers

_________________________
- Vijay G
Strive for Perfection
 
Old February 6th, 2007, 05:11 PM
Authorized User
 
Join Date: Oct 2005
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I would suggest that you use VARCHAR to store phone numbers because if you are in the U.S. and it will include the area code, then an INT data type will be enough.

SQL Server Helper
How well do you know SQL? Find out with the free test assessment from SQL Server Helper!!!
http://www.sql-server-helper.com/free-test/default.aspx

Got a SQL Server Question? Ask us here: http://www.sql-server-helper.com/forums/default.asp





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error converting data type varchar to int. - SQL baysaa SQL Server ASP 1 March 16th, 2008 11:56 PM
Help me Sql Data type ! minhtri SQL Server 2000 2 April 19th, 2005 07:53 PM
what data type in sql server kiwibey SQL Server 2000 3 November 22nd, 2004 11:05 PM
Data Type Mismatch in SQL code Teqlump SQL Language 11 September 30th, 2004 09:27 AM
Change data type to DATE in SQL kherboon SQL Server 2000 4 July 28th, 2003 10:27 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.