Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Dec 2005
    Location
    agra
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    difference in datatypes

    i want to know

    what is the difference b/w text,char,varchar and ntext,nchar,nvarchar in sqlserver ?


    thanks.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    char: fixed length column, storage size is defined size, regardless of entered size
    max 8000 bytes
    varchar: variable length column, storage size is equal to size of entered data
    max 8000 bytes
    text: variable length column storage size equal to size of entered data
    max 2,147,483,647 bytes

    above are all for storing ascii characters

    prefixed with n, the fields are meant to store Unicode characters. All max amounts can be divided by 2
    I am the luckiest man in the world


  •  

    Posting Permissions

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