2 NVarchar fields - can row max out?

  • I have 2 fields as varchar(4000) each.

    Will this max out row size and return an error?

    Many thanks!!!

    CREATE TABLE [LogTransaction] (

    [logid] [int] IDENTITY (1, 1) NOT NULL ,

    [logTemplateid] [int] NULL ,

    [logTitle] [varchar] (180) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

    [logBody] [nvarchar] (4000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

    [logDescription] [varchar] (400) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

    [logWhy] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

    [logWhen] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

    [logAction] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

    [logImpact] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

    [logSendDate] [smalldatetime] NULL ,

    [logReminder] [bit] NOT NULL ,

    [logReminderDate] [smalldatetime] NULL ,

    [logEmailTo] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

    [logOwner] [nvarchar] (6) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

    [logApprover] [nvarchar] (6) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

    [logStatus] [int] NOT NULL ,

    [logRawHTML] [nvarchar] (4000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

    [logReminderRawHTML] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

    [logErrors] [varchar] (300) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

    [logSubmitDate] [smalldatetime] NULL CONSTRAINT [DF_LogTransaction_logSubmitDate] DEFAULT (getdate()),

    [logApprovedDate] [smalldatetime] NULL ,

    [logDepartmentID] [int] NULL ,

    [logSendStatus] [int] NULL ,

    [logReminderStatus] [int] NULL

    ) ON [PRIMARY]

    GO

  • Yes. Each NVARCHAR column could require up to 8000 bytes each.

  • If you're on SQL 2005 you could use the NVARCHAR(MAX) datatype instead



    Shamless self promotion - read my blog http://sirsql.net

  • So what should I do?:cool:

    Split data into 2 tables to handle this?

    I am SQL Server 2000

  • Split them off so each has its own table, with just the nvarchar and an ID column. Otherwise, you might have trouble with the other columns.

    I'll ask Steve to move this thread to the right forum.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply