SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Apr 2011
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Big varchar2 field for small values (?)

    What cons would I have if using, for example, a 2000 character varchar2 database table field for storing mixed content like textarea input (close to 2000 characters), but also use it for storing textbox input (realistically ~30 characters)? This solution is more complicated than I wrote here, so I would like to leave it, however it would be great if you could point out the disadvantages here.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,215
    Mentioned
    58 Post(s)
    Tagged
    3 Thread(s)
    a varying character column is only as long as its content, but never longer than its max

    i don't see any downside at all to what you've got
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Member
    Join Date
    Apr 2011
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I understand about the column and the length of content. Good to hear that there are no disadvantages that I didn't know about. Thanks!


Bookmarks

Posting Permissions

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