I have recently installed SQL 2008 R2
CREATE TABLE TPERSONS(
personid int PRIMARY KEY NOT NULL,
lastname varchar(50) NULL,
firstname varchar(50) NULL,
salary money NULL,
managerid int NULL -- foreign key to personid
)
I do not understand why I receive this error.
Major Error 0x80040E14, Minor Error 26302
)
The specified data type is not valid. [ Data type (if known) = varchar ]
The VARCHAR data type accepts character strings, including Unicode, of a variable length is up to the maximum length specified in the data type declaration. A VARCHAR declaration must include a positive integer in parentheses to define the maximum allowable character string length.
Values in VARCHAR columns are variable-length strings. The length can be specified as a value from 0 to 65,535. The effective maximum length of a VARCHAR is subject to the maximum row size (65,535 bytes, which is shared among all columns) and the character set used.
Returns the error number for the last Transact-SQL statement executed.
The data type varchar
is not one of the supported data types on SQL Server CE. You must use nvarchar
.
Note that date
is not supported, either. Use datetime
instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With