- The text and ntext types are both deprecated in SQL server 2008 so avoid using them, they have been replaced by varchar(max) and nvarchar(max).
- The difference between char and varchar is that char is fixed length and varchar is variable length .
- The advantage of using char over varchar is that updates made to a char column never require moving the row because the data that is entered always fits in the allocated space
- What about nchar and nvarchar? both of these data types store characters using the Unicode Universal Code Page (UCS-2). this means that if you use nchar or nvarchar, you can store any type of character regardless of the collation you choose because two bytes are always used to store each character. contrast with varchar and char, which store characters using one or two bytes depending on the collation.
- Note that: if you want to use different collation than the one specified on a column when making te comparsion
............ where Name='Mohamed' COLLATE Finnish_Swedish_CI_AS
- To get all the collations of the SQL Server 2008 by using table valued function fn_helpcollations
Select *
From fn_helpcollations()
Exact Numbers
- Difference between Decimal Types & numeric:
- when using the decimal data type, you can specify the precision and scale of values stored using the data type. the precision defines the total number of digits that the data type holds, supporting a maximum precision of 38 and the scale defines how many of the digits defined by the precision are used as decimals.
Approximate Numeric Types
- the float data type accepts a parameter. the parameter supplied to the float data type defines the number of bits that are used to store the mantissa of the floating point number

No comments:
Post a Comment