Problem solve Get help with specific problems with your technologies, process and projects.

VARCHAR and NVARCHAR data types in SQL Server 2005

Having trouble with using VARCHAR and NVARCHAR data types in SQL Server 2005 Express or Enterprise Edition? Learn which properties could be the problem.

I have tried to use this data type feature with SQL Server 2005 Express Edition as well Enterprise Edition:

CREATE TABLE largeValues (

lVarchar VARCHAR (MAX),

lnVarchar NVARCHAR (MAX),

lVarbinary VARBINARY (MAX)


But it is not working. It is giving me the following error:

Msg 170, Level 15, State 1, Line 3

Line 3: Incorrect syntax near 'MAX'.

Which edition will it work in? Can we make some configurations for this feature to be successful, or is it only available for the licensed version of SQL Server 2005.

It does work. My guess is that you don't have the database in 90 compatibility mode. Look at the properties of the database and look on the Options tab.

Dig Deeper on SQL-Transact SQL (T-SQL)

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.