Home Forums SQL Server 2008 T-SQL (SS2K8) What needs to consider when adding a password to the table RE: What needs to consider when adding a password to the table

  • please suggest to have pk at table level

    I guess you have no choice here. PK can only be set "at table level"

    ...every time remove pk before proc executes then add it at the end of proc execution?

    That would be worse possible design. PK shouldn't be dropped and recreated in order to run any stored proc (eg. the one which populates table.)

    If you worry about data which potentially will not load due to duplicate values in the PK column, use staging table where it's not PK, validate and then load only valid data into your final destination table.

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]