Data types for stored procedure's Input Parameters

  • Hi,

    I have written a SP which accepts 1 Integer and 3 nvarchar type of inpur parameters.

    Issue is my nvarchar type of parameters may contains the data which will exceed the maximum limit.

    In SP I am concatinating these input parameters with one query as where clause by declaring a loca varaible. Problem is it is exceeding the max limit of nvarchar limit. and I cant use ntext data type for local variables.

    In this case which data type should I use.

  • Use nvarchar(max) rather than nvarchar(4000)

    NText is a deprecated data type, should not be used in new development and will be removed in a future version of SQL.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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