Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2005
    Posts
    115

    Unanswered: char nchar vchar nvchar !?

    Hello
    in MS SQL 2000 for text it is possible ti use
    char
    nchar
    varchar
    nvarchar

    what must be used and for what ?
    I want to store normal text with occidental char (accents)

    thank you

  2. #2
    Join Date
    Nov 2005
    Location
    San Francisco, CA
    Posts
    506
    Quote Originally Posted by quentin
    Hello
    in MS SQL 2000 for text it is possible ti use
    char
    nchar
    varchar
    nvarchar

    what must be used and for what ?
    I want to store normal text with occidental char (accents)

    thank you
    Varchar and nvarchar provide more efficient storage than char and nchar.
    Text and ntext is used to store text that would be longer than 8000 characters.
    You would use nchar,nvarchar and ntext only if you want to use special characters(Unicode character set).


    See this-
    Char - fixed no of non unicode characters -max size 8000 characters if you assign char(10) and store 7 characters in it, it will store 3 blank spaces in it.But if you use varchar(10) and do the same thing that will not happen,it will store only 7 characters.

    And Unicode is a character set that is capable of displaying and storing 65,536 different characters,whereas a standard character set can store and display only 256 different characters.Unicode uses 2 bytes and is very useful for international companies.Hope this will help you.
    Joydeep
    Last edited by rudra; 02-14-06 at 03:25.

  3. #3
    Join Date
    Jun 2005
    Posts
    115
    then nvarchar seems the best for my needs

    thank you

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    You would be well-served by reviewing descriptions of the different datatypes in Books Online.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  5. #5
    Join Date
    Jun 2005
    Posts
    115
    yes i found it

    thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •