locked
char and varchar RRS feed

  • Question

  • Hi!

    In your char and varchar (Transact-SQL) page says:

    char [ ( n ) ] Fixed-length, non-Unicode string data.

    But, what are non-Unicode characters?

    I need to store in a column a string data with the following characters:

    - Capital Letters.

    - Low letters.

    - Digits.

    - !, ", %, &, ', (, ), *, +, ,, -, ., /, _, :, ;, <, =, >.

    Can I store them into a varchar column?

    Thursday, April 12, 2018 6:48 AM

Answers

  • char and varchar permits characters from the code page of the collation you use. Thus, the exact set varies, but about all code pages includes the ASCII set for codes points 32 to 127, and all characters you list seem to be characters in the ASCII set, so you should be fine.

    • Marked as answer by VansFannel Thursday, April 12, 2018 7:51 AM
    Thursday, April 12, 2018 7:25 AM

All replies