如何使用sql命令INSERT输入换行 [英] How to enter new line using sql command INSERT

查看:351
本文介绍了如何使用sql命令INSERT输入换行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Q:

我想知道在表中插入新行的SQL查询的语法.

I wanna to know the syntax of SQL query of inserting new line in my table.

我的意思是,我想在表abc中输入以下内容:

I mean ,I wanna to enter the following in my table abc:

  aaaaaaaaaa

  bbbbbbbbbb

  cccccccccccc

通过INSERT命令维护新行.

Maintaining the new line.through INSERT command .

预先感谢

推荐答案

当我回答此问题时,您已将其标记为SQL Server2008.此后,您就对其进行了编辑,使其与Informix有关.以下适用于SQL Server 2008.

When I answered this question, you'd got it tagged with SQL Server 2008. You've since edited it to be about Informix. The following works for SQL Server 2008.

INSERT INTO MyTable(MyField) VALUES('AAAAA' + CHAR(13) + CHAR(10) + 'BBBBB')

Informix看起来更复杂.您必须根据本文档我在Google上找到了"informix sql换行符"

Informix looks more complicated. You have to set an option according to this documentation I found with a google for "informix sql newline"

EXECUTE PROCEDURE IFX_ALLOW_NEWLINE('T')

这篇关于如何使用sql命令INSERT输入换行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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