Data cut in mysql

Asked

Viewed 52 times

1

I am adding a small text in my database but the text is always cut, for example:

Company X operates in private security with the aim of preventing and reducing property losses in a given organization, and inhibiting any action against people’s lives. Our service is personalized and we respect the particularity of each client, setting up an operational plan according to procedures and after vulnerability analysis.

What is stored in the bank.

Hiperion acts in private security with the objective of preventing and reducing property losses in a given organization, in addition to inhibiting any action against people’s lives. Our service is personalized and responded~

someone knows what might be the cause of this?

  • 2

    Your column type is set wrong. For example, varchar(250), which is the number of characters you pasted as a result. Consider increasing the number of characters or changing the type to text() for example. Show us the SQL of the table that is experiencing problems.

  • Enter the code and see the size of the field as Buback said

  • I’m trying to use sql to change column type and it’s not working: ALTER TABLE servicos ALTER COLUMN 'text' text;

  • @Rafaelacioly, you can only do it if you have no records. Back up, delete the records and then run the type change.

  • Check this out: http://answall.com/q/78812/101

1 answer

2


This is because the size of your column (probably a VARCHAR with size 255) is limiting the amount of characters that can be registered in the table.

To resolve this, change the column type to TEXT. Example:

ALTER TABLE nomedatabela MODIFY nomedacoluna TEXT;

Obs.: It is recommended to do backup table when executing structure change commands.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.