Update with SET giving error

1

I have several UPDATE with pretty much the same code as this:

UPDATE cliente
  SET Email = '[email protected]'
  WHERE idCliente = 0000;

But some give this error:

  

Data truncation: Data too long for column 'Email' at row 1

I can not understand, can anyone help me?

    
asked by anonymous 10.08.2018 / 03:30

1 answer

6

The error message is clear about what is happening: the data is too long for the Email column.

You are trying to record 29 characters, certainly this column is set in the table with a smaller size than this, or put a smaller die or put a larger size in the column.

Note that if the characters leave the spectrum of what is called the ASCII table, the character will occupy 2 or more bytes, depending on the configuration of the table, you need a bigger buffer.

    
10.08.2018 / 03:33