MySQL Prepare语句-最大长度1000个字符 [英] MySQL Prepare Statement - Maximum Length 1000 Characters

查看:556
本文介绍了MySQL Prepare语句-最大长度1000个字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一条SQL语句,该语句超过了我通过prepare方法使用的1000个字符-反正有一点可以扩展此值吗?

I have an SQL statement which exceeds 1000 characters that I'm using through prepare method - is there anyway to extend this value marginally?

一旦我使用了prepare命令,它就会将SQL截断为1000个字符,类似地,如果我只选择包含sql字符串的变量,它也会在输出中被截断.

Once I use the prepare command it truncates the SQL to 1000 characters, similarly if I just select the variable holding the sql string this also is truncated in output.

除了核心SQL之外,还可以添加任意数量的其他查询.

In addition to the core SQL there could be any number of additional queries added on.

我想我可以创建一个视图,然后从该视图中进行选择,但是MySQL中的视图有些迟钝.

I suppose I could create a view and then select from the view, however views in MySQL are a little sluggish.

我知道我可以对此进行细化并替换为select tv.*等,并且在我的试用中已经做到了,但是附加查询会大大增加长度,实际上,选择的项目是我最不用担心的事情.

I know I can refine this down and replace with select tv.* etc and I have done that in my trials, however the additional queries can add significantly to the length and actually the items that are selected are least of my worries.

没有办法扩展1000个限制.

Is there no way to extend the 1000 limit.

推荐答案

因此,为澄清起见,遗憾的是无法解决愚蠢问题-事实证明我的变量sqlString受varchar(1000)类型限制.很明显我看不到.

So for clarification, sadly there is no cure for stupidity - turns out my variable sqlString was limited by the type varchar(1000). So obvious that I couldn't see it.

这篇关于MySQL Prepare语句-最大长度1000个字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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