Passing parameter to SProc

  • [font="Verdana"]Hi All,

    Can anybody tell me why N is used while passing parameter to Stored Procedure? i.e.

    EXEC {SProc} @Param = N'{Param Value}'

    Thanks in advance,

    Mahesh[/font]

    MH-09-AM-8694

  • It means that the value that you are passing can be a Unicode string, it is not really needed unless you are using Unicode

  • I'd change that definition just slightly. It means that the string passed will be unicode. This would be for use with NVARCHAR, NCHAR and the other fields and/or parameters in functions that require unicode.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply