varchar / cassandra中文本的最大长度 [英] Max length of varchar / text in cassandra

查看:309
本文介绍了varchar / cassandra中文本的最大长度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个简单问题的答案。
假设我有一个表,用于在其中存储内容。
内容只是一个字符串。
我想找到这个特定商品的最大长度是多少?
我正在阅读文本类型只是varchar的别名。 varchar长度只有255还是可以更长?

I am trying to find the answer to a simple question. Let say I have a table which I store content in it. The content is just a string. I am trying to find what is my max length for this specific one? I was reading that "text" type is just an alias to varchar. Is varchar length only 255 or it can be more?

推荐答案

您可以在数据库中使用TEXT列(大约64KB字符)。

You can use TEXT column in your database ( about 64KB characters).

您知道Java中的字符串有2 ^ 31-1个字符

As you know String in java has 2^31-1 characters

这篇关于varchar / cassandra中文本的最大长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆