nischalinn Posted April 12, 2011 Report Share Posted April 12, 2011 I am new to database designing. I want to know about different data types in Microsoft SQL Server 2005. 1. bigint2. binary(50)3. nchar4. ntext vs text5. numeric6. nvarchar7. datetime vs smalldatetime8. smallmoney vs money9. sql_variant10. timestampWhat are the appropriate use of such datatypes, I mean suppose when to use nvarchar and when to use ntext?? Quote Link to comment Share on other sites More sharing options...
ɹəuəllıʍ ʇɐb Posted April 13, 2011 Report Share Posted April 13, 2011 Basically char is a fixed-length character string, so if you define char(8) and it contains the character 'A', it is still 8 characters long ('A␢␢␢␢␢␢␢', length 8).On the other hand, varchar is a variable-length character string, and the contents equals what is entered ('A' = 'A', length 1).Data type text is similar to varchar, but no longer supported by newer SQL servers, so it should not be used.Data types nchar, nvarchar, and ntext are the same as above, but for multibyte (Unicode) character sets.More info at http://msdn.microsoft.com/en-us/library/ms187752%28v=SQL.90%29.aspx Quote Link to comment Share on other sites More sharing options...
gladiolus Posted March 14, 2012 Report Share Posted March 14, 2012 All data stored in Microsoft SQL Server 2005 must be compatible with one of these base data types. The cursor data type is the only system data type that cannot be assigned to a table column. It can be used only with variables and stored procedure parameters... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.