we are currently considering installing our row columns nvarchar(max)instead of specifying a specific length to prevent any problems when the database did not have enough space to store the row. I'm just wondering if this is good, or if it could cause any problems, as it was normal, so please indicate the length, for example nvarchar(10), and not nvarchar(max). We also use it often varbinary(max), since we donβt know how much binary data we need, so I'm not sure how much this effect is, or let our inserts not be as fast as I think they should be. This is an example table:
CREATE TABLE [dbo].[SAMPLETABLE] (
[ID] [uniqueidentifier] NOT NULL,
[FIELD1] [int] NOT NULL,
[FIELD2] [nvarchar] (2000) NULL,
[FIELD3] [nvarchar] (max) NULL,
[FIELD4] [uniqueidentifier] NULL,
[FIELD5] [int] NULL,
[FIELD6] [nvarchar] (2000) NULL,
[FIELD7] [varbinary] (max) NULL,
[FIELD8] [varbinary] (max) NULL,
[FIELD9] [varbinary] (max) NULL,
[FIELD10] [uniqueidentifier] NULL,
[FIELD11] [nvarchar] (2000) NULL,
[FIELD12] [varbinary] (max) NULL,
[FIELD13] [varbinary] (max) NULL,
[FIELD14] [bit] NULL,
[FIELD15] [uniqueidentifier] NULL,
[FIELD16] [varbinary] (max) NULL,
[FIELD17] [bit] NULL,
[FIELD18] [tinyint] NULL,
[FIELD19] [datetime] NULL,
[FIELD20] [nvarchar] (2000) NULL,
PRIMARY KEY CLUSTERED
(
[ID] ASC
)
) ON [PRIMARY]
GO
nvarchar(2000) nvarchar(max), ( )? sqlserver ?