IT Community - Software Programming, Web Development and Technical Support

SQL Server Data Types and Ranges.

This is a discussion on SQL Server Data Types and Ranges. within the Database Support forums, part of the Web Development category; Hi Friends , In this Thread we will Discuss about Sql data type Ranges , Exact numerics bigint -9,223,372,036,...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Database Support

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 02-22-2008, 03:02 AM
Sundaram Sundaram is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Location: chennai
Posts: 117
Sundaram is on a distinguished road
Send a message via MSN to Sundaram Send a message via Yahoo to Sundaram
Default SQL Server Data Types and Ranges.

Hi Friends ,
In this Thread we will Discuss about Sql data type Ranges ,
Exact numerics

bigint -9,223,372,036,854,775,808 To 9,223,372,036,854,775,807
int -2,147,483,648 To 2,147,483,647
smallint -32,768 To 32,767
tinyint 0 To 255
bit 0(False) To 1(True)
decimal -10^38 +1 To 10^38 –1
numeric -10^38 +1 To 10^38 –1
money -922,337,203,685,477.5808 To+922,337,203,685,477.5807
smallmoney -214,748.3648 To+214,748.3647

Last edited by Sundaram : 02-22-2008 at 03:07 AM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-22-2008, 03:03 AM
Sundaram Sundaram is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Location: chennai
Posts: 117
Sundaram is on a distinguished road
Send a message via MSN to Sundaram Send a message via Yahoo to Sundaram
Default Approximate numeric’s

float -1.79E + 308 To 1.79E + 308
real -3.40E + 38 To 3.40E + 38

Last edited by Sundaram : 02-22-2008 at 03:06 AM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-22-2008, 03:04 AM
Sundaram Sundaram is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Location: chennai
Posts: 117
Sundaram is on a distinguished road
Send a message via MSN to Sundaram Send a message via Yahoo to Sundaram
Default datetime and smalldatetime

datetime (3.33 milliseconds accuracy) Jan 1, 1753 To Dec 31, 9999
smalldatetime (1 minute accuracy) Jan 1, 1900 To Jun 6, 2079
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-22-2008, 03:04 AM
Sundaram Sundaram is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Location: chennai
Posts: 117
Sundaram is on a distinguished road
Send a message via MSN to Sundaram Send a message via Yahoo to Sundaram
Default Character Strings

char Fixed-length non-Unicode character data with a maximum length of 8,000 characters.
varchar Variable-length non-Unicode data with a maximum of 8,000 characters.
varchar(max) Variable-length non-Unicode data with a maximum length of 231 characters (SQL Server 2005 only).
text Variable-length non-Unicode data with a maximum length of 2,147,483,647 characters.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-22-2008, 03:08 AM
Sundaram Sundaram is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Location: chennai
Posts: 117
Sundaram is on a distinguished road
Send a message via MSN to Sundaram Send a message via Yahoo to Sundaram
Default Unicode Character Strings

nchar Fixed-length Unicode data with a maximum length of 4,000 characters.
nvarchar Variable-length Unicode data with a maximum length of 4,000 characters.
nvarchar(max) Variable-length Unicode data with a maximum length of 230 characters (SQL Server 2005 only).
ntext Variable-length Unicode data with a maximum length of 1,073,741,823 characters.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-22-2008, 03:09 AM
Sundaram Sundaram is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Location: chennai
Posts: 117
Sundaram is on a distinguished road
Send a message via MSN to Sundaram Send a message via Yahoo to Sundaram
Default Binary Strings

binary Fixed-length binary data with a maximum length of 8,000 bytes.
varbinary Variable-length binary data with a maximum length of 8,000 bytes.
varbinary(max) Variable-length binary data with a maximum length of 231 bytes (SQL Server 2005 only).
image Variable-length binary data with a maximum length of 2,147,483,647 bytes.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-22-2008, 03:11 AM
Sundaram Sundaram is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Location: chennai
Posts: 117
Sundaram is on a distinguished road
Send a message via MSN to Sundaram Send a message via Yahoo to Sundaram
Default Other Data Types

sql_variant Stores values of various SQL Server-supported data types, except text, ntext, and timestamp.
timestamp Stores a database-wide unique number that gets updated every time a row gets updated.
uniqueidentifier Stores a globally unique identifier (GUID).
xml Stores XML data. You can store xml instances in a column or a variable (SQL Server 2005 only).
cursor A reference to a cursor.
table Stores a result set for later processing
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 11-14-2008, 05:11 AM
levelup2 levelup2 is offline
D-Web Trainee
 
Join Date: Nov 2008
Posts: 8
levelup2 is on a distinguished road
Default Re: SQL Server Data Types and Ranges.

Thanks for all your post, I have the same problem and now it has been sorted!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the difference between CHAR and VARCHAR data types? sundarraja Database Support 1 02-01-2008 10:36 PM
Copy SQL data structures from one SQL server to another SQL server? arjkhanna Server Management 5 11-05-2007 03:57 AM
How can I implement opaque (abstract) data types in C? prasath C and C++ Programming 1 07-30-2007 04:24 AM
List of Server types Karpagarajan Server Management 0 04-05-2007 05:02 AM
Java:Tutorial - Data Types pranky Java Programming 0 02-24-2007 12:47 AM


All times are GMT -7. The time now is 03:44 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0