Error in CREATE TABLE  
Author Message
mib_sanfran





PostPosted: Tue Jun 05 22:37:49 CDT 2007 Top

SQL Server Developer >> Error in CREATE TABLE

Hi,

I have a SQL statement as below:

CREATE TABLE SystemParameter
(SystemParameterID DTTypeID,
SystemParameterName DTOptionName,
SystemParameterValue DTOptionValue,
AgentID int,
Threshold int,
CheckOrNot int,
ErrorText DTObjectDescription)

But I've got error as below:

Warning: The table 'SystemParameter' has been created but its maximum
row size (9141) exceeds the maximum number of bytes per row (8060).
INSERT or UPDATE of a row in this table will fail if the resulting row
length exceeds 8060 bytes.

Anything wrong with the CREATE TABLE statement?

SQL Server28  
 
 
Dan





PostPosted: Tue Jun 05 22:37:49 CDT 2007 Top

SQL Server Developer >> Error in CREATE TABLE > Anything wrong with the CREATE TABLE statement?

There is nothing syntactically wrong. The row length warning means that the
variable row length could potentially exceed the maximum size. If you later
attempt an INSERT/UPDATE that exceeds the max size, the insert/update will
fail.

You didn't provide the UDT definitions but it is likely that underlying data
types have a large maximum size.


--
Hope this helps.

Dan Guzman
SQL Server MVP



> Hi,
>
> I have a SQL statement as below:
>
> CREATE TABLE SystemParameter
> (SystemParameterID DTTypeID,
> SystemParameterName DTOptionName,
> SystemParameterValue DTOptionValue,
> AgentID int,
> Threshold int,
> CheckOrNot int,
> ErrorText DTObjectDescription)
>
> But I've got error as below:
>
> Warning: The table 'SystemParameter' has been created but its maximum
> row size (9141) exceeds the maximum number of bytes per row (8060).
> INSERT or UPDATE of a row in this table will fail if the resulting row
> length exceeds 8060 bytes.
>
> Anything wrong with the CREATE TABLE statement?
>

 
 
Curious





PostPosted: Wed Jun 06 09:05:40 CDT 2007 Top

SQL Server Developer >> Error in CREATE TABLE Thanks Dan! I changed definition of one column to a smaller varchar
type, and the query went through.