Unicode use two bytes to save a character. So nchar has maxium 4000 bytes to use, but char can go up to 8000 bytes.varchar is used when the length of the column changes a great deal.Of course, just the rest of the length is wasted in Char.no, won't fill up with space. get truncated, or even can't put into therenumeric use fixed decimal point. In real, the decimal point is not decided, thus have have more precision when necessary. usually numeric is the choice

解决方案 »

  1.   

    Unicode是国际统一字符集,使用他可使你的程序具有良好的扩展性,在其他系统下正常使用,varchar可变长字符串,实际大小根据你给值的长短决定
    如果定义成char类型,写入数据时可以写入一个比定义还要短的字符串,不足部分是不是由空格来填充,但分配长度是原来的,实际长度是根据给值的(串后的空格不计入长度),超长截断.
    numeric和real的数据长度不一样,REAL是浮点型,numeric和decimal一样,好处是可定义长度和小数点后位数
    34.421用NUMERIC好.
      

  2.   

    Unicode是国际统一字符集,使用他可使你的程序具有良好的扩展性,在其他其他语言下正常使用,varchar可变长字符串,实际大小根据你给值的长短决定
    如果定义成char类型,写入数据时可以写入一个比定义还要短的字符串,不足部分是不是由空格来填充,但分配长度是原来的,实际长度是根据给值的(串后的空格不计入长度),超长截断.
    numeric和real的数据长度不一样,REAL是浮点型,numeric和decimal一样,好处是可定义长度和小数点后位数
    34.421用NUMERIC好.