SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    $books++ == true matsko's Avatar
    Join Date
    Sep 2004
    Location
    Toronto
    Posts
    795
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    TINYTEXT or VARCHAR(255)

    I have come across a few database designs that use a VARCHAR(255) column. Now you can also have a TINYTEXT column which is essentially the same thing (in terms of character space: 255).

    However then what would be the point of using a VARCHAR(255) column insead of a TINYTEXT column?
    I can't believe I ate the whole thing

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,350
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by the mysql docs
    There is no trailing-space removal for BLOB and TEXT columns when values are stored, as there is for VARCHAR columns.

    BLOB and TEXT columns cannot have DEFAULT values.

    Note that each BLOB or TEXT value is represented internally by a separately allocated object. This is in contrast to all other column types, for which storage is allocated once per column when the table is opened.
    helps?

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


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
  •