how to add index to column by script RRS feed

  • Question

  • User-583959464 posted

    using sql server 2017, may I know how to add index to nvarchar(max) column by script, any script reference?

    or how to build a xml column and add index to xml column by script?

    Tuesday, March 9, 2021 3:33 PM

All replies

  • User503812343 posted

    try this

    CREATE NONCLUSTERED INDEX IDX_NC_temp_name ON tablename(idcolumn) INCLUDE(columnamewithnvarcharmax)

    Tuesday, March 9, 2021 3:45 PM