Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8607537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:22:48+00:00 2026-06-12T03:22:48+00:00

i have defined a column in my mysql database as : ALTER TABLE `my_table`

  • 0

i have defined a column in my mysql database as :

ALTER TABLE `my_table` CHANGE `desc` `desc` VARCHAR( 255 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL

But when i enter a text from my front end to insert into the table , after the size of column data reaches 233 it truncates further text added ie text beyond 233 character is not saved !!

i tried changing size of column to VARCHAR(511) but achieved no success.

i counted the nos of characters using php strlen() and it revealed 233 characters

Why is MySQL doing this , and how can i save the text ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T03:22:49+00:00Added an answer on June 12, 2026 at 3:22 am

    A VARCHAR(250) NOT NULL takes one byte to store the length n, and n bytes to store the actual string. So a column holding a value ‘abc’ will account for 4 bytes. In a VARCHAR(250) NULL, the nullity takes one bit, and a NULL value won’t take anything else. A non-null value takes that bit, one byte for length and n bytes for data. Needing a bit here means that several nullable columns share one or more bytes to record their nullity.

    Other variable length data types are similar. BLOB and TEXT types of the various sizes may have more than a single byte for length, but otherwise work pretty much the same. Numeric types as well as the fixed-length CHAR types have fixed memory requirements. I think I the CHAR will omit the length byte, as its content is padded with spaces to that fixed length.

    Indices might increase the memory requirements. Multy-byte character sets (including UTF-8) might increase the memory requirements, so the above statements will only hold if your table was created for latin1 or similar. So you can deduce that VARCHAR(250) don’t mean 255 caracters, it will depend on how you encode your strings

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A table I have no control of the schema for, contains a column defined
I have a nvarchar(50) column in a SQL Server 2000 table defined as follows:
I am using MySQL Workbench to create a database. I have a table called
I have a simple MySQL table with one column: name . I would like
I have a multi-tenant MySQL database. For most things I use a tenant-id column
i have this POJO mapped to my MySQL database: @Entity @Table(name = participantespresentes, catalog
I have a result of a query which has BLOB column defined in it.
We have a very large (10million+) row table stored in MySql using the InnoDB
Informix-SE 4.10.DD6, Informix-SQL 4.10.DC1 Perform screen: 1) I have column defined as DATETIME HOUR
In one of my MySQL tables, I have following columns: Skills varchar(80) Industry varchar(40)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.