在MySQL中存储大字符串的最佳数据类型?
您可以使用文本数据类型存储大字符串。以下是语法-
CREATE TABLE yourTableName ( yourColumnName text, . . N );
让我们首先创建一个表-
mysql> create table DemoTable -> ( -> MyStringValue text -> );
使用插入命令在表中插入一些记录-
mysql> insert into DemoTable values('This is a text data type to store large string');使用select语句显示表中的所有记录-
mysql> select *from DemoTable;
这将产生以下输出-
+------------------------------------------------+ | MyStringValue | +------------------------------------------------+ | This is a text data type to store large string | +------------------------------------------------+ 1 row in set (0.00 sec)
热门推荐
10 舞蹈培训开业祝福语简短
11 周一祝福语简短好看
12 新婚伴娘祝福语致辞简短
13 公司生日祝福语创意简短
14 梦到亲人结婚祝福语简短
15 春节祝福语精辟简短的
16 生日祝福语简短年轻文案
17 自家新车的祝福语简短
18 学校新年祝福语简短俏皮