2

Hi I've got a variable 'text' within my MYSQL database that gathers something like a status update. I believe this variable has a limit of 200?

  • Is this something that is already set?

  • If so what variable would be suitable for both a quick 150 character updates as well as something as long as a 1500 word article if a user wanted to elaborate?

  • How do i change it within phpmyadmin to the desired new variable if data is currently present within the present form?
4

2 に答える 2

1

http://dev.mysql.com/doc/refman/5.6/en/string-type-overview.html

VARCHAR

可変長文字列。M は、列の最大長を文字数で表します。M の範囲は 0 ~ 65,535 です。

文章

最大長が 65,535 (216 – 1) 文字の TEXT 列。

VARCHAR(1500) と TEXT(1500) の両方で問題ないと思います。

データが現在のフォーム内に存在する場合、phpmyadmin 内で目的の新しい変数に変更するにはどうすればよいですか?

列のデータ型を変更するには、SQL を使用します。これはどのツールでも機能します。

ALTER TABLE  `tablename` CHANGE  `colname` VARCHAR( 1500 );
于 2013-04-13T08:05:51.337 に答える
0

Change私たちには機能しません。使用する必要がありましたModify

ALTER TABLE `tablename` MODIFY `colname` VARCHAR( 1500 );
于 2014-12-30T19:08:09.600 に答える