DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: varchar and char

  1. #1
    Join Date
    Oct 2000



    I would like to have an attribute with datatype char(32768) and this attribute will be one in GROUP BY statement which is frequently used. In addition, I don't want to waste storage space as only a small number of cases with long-length characters. Then I may consider to use varchar2(32768). Are there any techniques or tricks to make it better?

    Thanks a lot.


  2. #2
    Join Date
    Oct 2000
    a char(1000) field will a 1000 bytes size in your database although you do not need to use those 1000 characters.
    Say you want to save Joeli in that field what go get is 5 bytes name that uses 1000 bytes at your database.

    If you use a varchar2(1000) field you get a 5 byte name that uses 5 bytes in your databese and that field can be increased up to 1000 bytes.

    Hope this helps you.

  3. #3
    Join Date
    Jul 2000
    In PL/SQL you can use VARCHAR2(32768). In SQL the limit is 4000 for VARCHAR2, you cannot create a table with column VARCHAR2(32768).

Posting Permissions

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

Click Here to Expand Forum to Full Width