Field help to save a link

Asked

Viewed 581 times

0

I need to save a link in the database, which in the case is Mysql, I was using VARCHAR(255), but I easily noticed some of the links stored exceeded 255 characters, what kind of data can I use in the database to store this information? I believe it should support up to 400 characters, to ensure

1 answer

2


According to this response from Soen, then 2048 it has to be the maximum for seekers, so I believe 400 is very little, I believe that this is the minimum.

Then perform:

ALTER TABLE `tabela` CHANGE `coluna` `coluna` varchar(2048) NOT NULL
  • 2

    Just one remark, if you have no reason to cut back in 2048, setting 64k spends exactly the same space on db (+ real content). Up to 65535 bytes are spent only 2 bytes more than the content itself. More than that, only if it is TEXT

  • @Bacco Verdade, boa!

Browser other questions tagged

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