TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Can I declare varchar like this in an SQL Column?

2 点作者 markcrazyhorse将近 11 年前
Hey,<p>I may be totally wrong here because i&#x27;m only a junior and not too sure but I was certain that the maximum varchar() that could be set was 255 varchar(255).<p>However, i&#x27;m working on a database at the moment which was developed by another team and they have varchar(9999).<p>Is that right? I have had a quick Google but can&#x27;t find it.<p>Cheers for advice in advance folks :)

2 条评论

onion2k将近 11 年前
No database has a limit of 255 characters. Varchar limits are; MySQL - 65,535. MS SQL Server 2005 - 8000 (or 2GB if you use varchar(max) ). Oracle 9i - 4000<p>These are not character limits. They&#x27;re byte limits. If you&#x27;re storing multibyte strings (eg unicode-16, emoji, etc) then each character will take up more than one &#x27;space&#x27;.<p>But really, asking on HN? This is what StackOverflow is for.
评论 #7988091 未加载
评论 #7997741 未加载
fasteo将近 11 年前
You should post this question to stackoverflow.com
评论 #7997739 未加载