<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Emad Mokhtar</title>
        <link>http://geekswithblogs.net/EmadTech/Default.aspx</link>
        <description> </description>
        <language>en-US</language>
        <copyright>Emad Mokhtar</copyright>
        <managingEditor>system.emad@hotmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <image>
            <title>Emad Mokhtar</title>
            <url>http://geekswithblogs.net/images/RSS2Image.gif</url>
            <link>http://geekswithblogs.net/EmadTech/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>SQL Server 2008 Data types Part1</title>
            <link>http://geekswithblogs.net/EmadTech/archive/2009/08/17/sql-server-2008-data-types-part1.aspx</link>
            <description>&lt;p&gt;&lt;font size="2" face="Verdana"&gt;Hello Folks,&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2" face="Verdana"&gt;Today I'll will mention the Microsoft SQL Server 2008 Fileds data types, you need to choose the right data type for the database fileds for more speed efficency, and i think the most important thing the fundamental of the database itself.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2" face="Verdana"&gt;Let's begin:&lt;/font&gt;&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;&lt;font size="2" face="Verdana"&gt;&lt;u&gt;&lt;strong&gt;char:&lt;/strong&gt;&lt;/u&gt; the char datatype is ifxed in length, if you enter fewer that than the number of character defined the remaining length will be space filled to the right; use this data type when the column dat is to be of fixed length, which tends to be the case foe customer IDs and bank account IDs.&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2" face="Verdana"&gt;&lt;u&gt;&lt;strong&gt;nchar:&lt;/strong&gt;&lt;/u&gt; the nchar type is exactly like char, but will hold characters in unicode formate rather than ANSI; infact SQL Server allocates double the space internally, so unless there is a need in your database to hold this type of character, it's easier to stick with ANSI.&lt;/font&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;font size="2" face="Verdana"&gt;Note: &lt;/font&gt;
        &lt;ul&gt;
            &lt;li&gt;&lt;font size="2" face="Verdana"&gt;ANSI character sets only hold up to 256 char.&lt;/font&gt;&lt;/li&gt;
            &lt;li&gt;&lt;font size="2" face="Verdana"&gt;Unicode character sets only hold up to 65,536 chr.&lt;/font&gt;&lt;/li&gt;
        &lt;/ul&gt;
        &lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;font size="2" face="Verdana"&gt;&lt;u&gt;&lt;strong&gt;varchar:&lt;/strong&gt;&lt;/u&gt; the varchar data type holds alphanumeric data; just like char but with flexible size, you just set the maximum number of characters, maximum size is 8,000 character.&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2" face="Verdana"&gt;&lt;u&gt;&lt;strong&gt;nvachar:&lt;/strong&gt;&lt;/u&gt; it's defined in samilier way to varcar but it uses unicode.&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2" face="Verdana"&gt;&lt;u&gt;&lt;strong&gt;text:&lt;/strong&gt;&lt;/u&gt; the text data type holds data is longer than 8,000.&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2" face="Verdana"&gt;&lt;u&gt;&lt;strong&gt;ntext:&lt;/strong&gt;&lt;/u&gt; sae as text type, but holde unicode.&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2" face="Verdana"&gt;&lt;u&gt;&lt;strong&gt;image:&lt;/strong&gt;&lt;/u&gt; is very much like text data tybe, expect it's for any type of binary data, like images, movies, or music.&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2" face="Verdana"&gt;&lt;u&gt;&lt;strong&gt;int:&lt;/strong&gt;&lt;/u&gt; the integer data type is used for holding a anumeric values that don't have any deciaml point, it's rang is between -2,147,483,648 adn 2,147,483,674.&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2" face="Verdana"&gt;&lt;strong&gt;&lt;u&gt;bigint:&lt;/u&gt;&lt;/strong&gt; the bidint or big integer data type same as int but with larger rang, it's rang is between -9,223,372,036,854,77,808 and 9,223,372,036,854,77,807.&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2" face="Verdana"&gt;&lt;u&gt;&lt;strong&gt;smallint:&lt;/strong&gt;&lt;/u&gt; the smallint data type is samilar to int but with smaller rang, it's rang is between -32,768 to 32,767.&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2" face="Verdana"&gt;&lt;u&gt;&lt;strong&gt;tinyint:&lt;/strong&gt;&lt;/u&gt; it's  samller  than smallint data type.&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2" face="Verdana"&gt;&lt;u&gt;&lt;strong&gt;decimal/numeric:&lt;/strong&gt;&lt;/u&gt; both the decimal and numeric data types hold the same rang of data from -10 to the power 38+1 to 10 to he power 38-1.&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2" face="Verdana"&gt;&lt;u&gt;&lt;strong&gt;float:&lt;/strong&gt;&lt;/u&gt; it's used for numbers where the decimal point isn't fixed, it's rang is between -1.79e+308 to 1.79e+308&lt;/font&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;font size="2" face="Verdana"&gt;Warning:&lt;/font&gt;
        &lt;ul&gt;
            &lt;li&gt;&lt;font size="2" face="Verdana"&gt;The values can't always be seen as 100% accurate, as they can be approximate "Rounded".&lt;/font&gt;&lt;/li&gt;
        &lt;/ul&gt;
        &lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;font size="2" face="Verdana"&gt;&lt;u&gt;&lt;strong&gt;real:&lt;/strong&gt;&lt;/u&gt; it's like float data type but with wider rand, it's rang between -3.40e+38 to 3.40e+38, and still hold approximate value also.&lt;/font&gt;
    &lt;div align="left"&gt;&lt;/div&gt;
    &lt;/li&gt;
&lt;/ol&gt; &lt;img src="http://geekswithblogs.net/EmadTech/aggbug/134148.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>EmadTech</dc:creator>
            <guid>http://geekswithblogs.net/EmadTech/archive/2009/08/17/sql-server-2008-data-types-part1.aspx</guid>
            <pubDate>Mon, 17 Aug 2009 16:59:04 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/EmadTech/comments/134148.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/EmadTech/archive/2009/08/17/sql-server-2008-data-types-part1.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/EmadTech/comments/commentRss/134148.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>
