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

Thread: Difference CHAR(1) and VARCHAR2(1)

Hybrid View

  1. #1
    Join Date
    Aug 2001
    Posts
    56

    Difference CHAR(1) and VARCHAR2(1)

    Hi
    Can some one tell me the major difference between CHAR(1) and VARCHAR2(1), I need to use flag column of 1 byte.

    Which is best for use, and why, index will also apply for this column.

    Thanks & Regards
    Anuj
    Anuj
    India

  2. #2
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    use any of it.. dosent really matter in this case..
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

  3. #3
    Join Date
    Sep 2000
    Location
    Singapore
    Posts
    32
    CHAR(10) allocates 10 space and if you use only 3, say for example 'SAM', then balance 7 is left as such, won't be used or reusable. But if using VARCHAR(10), 'SAM' will take 3 and rest 7 will be reused. But in this case of FLAG, nothing make much difference, anyhow it is only 1 character
    Felix
    DBA

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