• Good question .. But explanation is slightly wrong.

    Table is not created because varchar(MAX) is not allowed type for use as a key column in an index. This doesn't mean you cannot create index on column length is more than 900 bytes. You can create index on column even with length of varchar(8000). Just we will receive warning message.

    Warning! The maximum key length is 900 bytes. The index 'UN_Name' has maximum length of 8000 bytes. For some combination of large values, the insert/update operation will fail.

    IF you try to insert/update a value of more than 900 bytes then error will be raised and insert fails.

    AS well as if you try to create a index on the column with CHAR(8000), this time you will recieve error on index creation itself because length of CHAR columns are fixed.

    --
    Dineshbabu
    Desire to learn new things..