zero
zero

Reputation: 221

Error when creating a table with max length column in MS SQL

I am creating a table in MS SQL and I want my column "name" to have the max length.


CREATE TABLE "example" (

"name"         character varying (MAX)       NULL, 
.....

but I receive an error as follows:

Table has no text/image columns, Received an invalid column length from.

Do you have any idea what is wrong. Sorry I just started using MS SQL.

Upvotes: 0

Views: 1314

Answers (1)

John Cappelletti
John Cappelletti

Reputation: 82010

Your looking for varchar(max) and remove quotes

create table example ([name] varchar(max),[othercol] int)

Upvotes: 1

Related Questions