通过 SQL Server 查询分析器更新长字符串
我有一个很长的文本字符串,我想更新表中的特定列。 sql查询分析器中的更新语句目前是一长行。有没有办法将更新语句分成多行以便于阅读更新语句?
I have a really long string of text that I would like to update a particular column in a table. The update statement in sql query analyzer is on one long line currently. Is there a way to break up the update statment into multiple lines for easier reading of the update statement?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
查询分析器允许您在文字中添加换行符:
但这也会插入 CR。另一个建议:
是标准程序。
Query analyzer lets you put line breaks into literals:
But this inserts a CR as well. The other suggestion:
is standard procedure.
我想你追求的是字符串连接?
您可以像这样进行更新:
I think what you are after is string concatenation?
You can do an update like this:
在多行上使用 UPDATE 语句没有问题。比如:
……就好了。
There's no problem having an UPDATE statement over multiple lines. Something like:
...is just fine.