Default value in SP for table type?

  • Hi all,

    I have a table type "TbType". It's used to pass result set from .net app to sql server.

    But I can not use default for this type.

    How can i do that?

    Type define:

    CREATE TYPE dbo.A AS TABLE

    (

    c1 smallint

    )

    and in sp:

    dbo.spname

    (

    @itbA A READONLY

    )

    what i want is :

    dbo.spname

    (

    @itbA A = null READONLY

    )

    Regards

    Sol

  • From Books Online:

    Create Procedure


    If a procedure contains table-valued parameters, and the parameter is missing in the call, a default of empty table is passed in.

    So, I would suggest omitting the parameter in the call.

  • Paul White (1/28/2010)


    From Books Online:

    Create Procedure


    If a procedure contains table-valued parameters, and the parameter is missing in the call, a default of empty table is passed in.

    So, I would suggest omitting the parameter in the call.

    Many thanks, Paul White 🙂

    And i think i need to stick along with BOL more.

    Regards

    Sol

  • sol.nt (1/28/2010)


    Many thanks, Paul White 🙂

    And i think i need to stick along with BOL more.

    Regards

    Sol

    It is a fine resource - though sometimes you need to know exactly where to look!

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

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