Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Comments field size in Database colum

 
sohaib yasir
Ranch Hand
Posts: 51
Eclipse IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to know technique that if i have a comments field on my blog and user will add comments more than 255 character or more than the column size in DB then how to dynamically set the comments filed size in Database column ?
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The maximum allowable length of a text column is probably database specific, but usually there is some hard limit (such as 4KB). If you want to use truly unlimited field for your text data, you should use a CLOB. In most databases there is still a limit on the maximum size of a CLOB, but it is usually high enough to be sufficient for virtually all purposes (that is, in the order of gigabytes, or even significantly larger).
 
sohaib yasir
Ranch Hand
Posts: 51
Eclipse IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Martin. This will help me a lot.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic