Home Forums SQL Server 7,2000 T-SQL Use of N with unicode constant parameter RE: Use of N with unicode constant parameter

  • N denotes that the subsequent string is in Unicode, means National language character set.

    When you use unicode you mast have Nvarchar/Nchar ...

    Index will be used anyway, but there are some performance issues in case when

    for example

    TABLE1 you have created index on columnA which is varchar type,

    TABLE2 you have created index on columnB which is Nvarchar type

    join this two tables

    select * from TABLE1 a join TABLE2 b on a.coumnA = b.columnB

    view execution plan

    after this, second case

    alter TABLE1 alter column columnA Nvarchar

    do the same select, view execution plan

    you will see deference.