0

我想在 Sql Server 中存储大约 50000 个字符或更多字符的文本描述。我在我的应用程序中使用 FCK 编辑器和 3 层架构。然后我想检索该数据并显示应用程序中的所有文本。如果描述很大,则可以按页面显示。

请建议。

4

5 回答 5

1

varchar(max)可以在您的限制范围内存储 2,147,483,647 个字符

于 2012-12-01T05:30:17.270 回答
0

您可以使用文本数据类型,

TEXT 用于大段字符串数据。

文字很好:

If you need to store large texts in your database
If you do not search on the value of the column
If you select this column rarely and do not join on it.
于 2012-12-01T05:36:58.460 回答
0

如果您使用 sql server 2005 或 2008 作为数据库,请尝试使用文本数据类型。因为文本数据类型用于存储无限的字符串数据。据我所知

于 2012-12-01T05:37:20.683 回答
0

您可以将其存储在多行中,而不是将整个数据存储为单个记录。保留列以标识表中的文件和行顺序。

    Create table Textfiledata
    (
    File_ID Numeric(10,0),
    File_Data Varchar(8000),
    Order Numeric(10,0),
    )

insert into Textfiledata(1,"some text",0);
insert into Textfiledata(1,"some text",1);
于 2012-12-01T09:38:25.910 回答
0

您可以选择数据类型 nvarchar(max)

于 2012-12-01T05:27:38.967 回答