• CELKO (12/14/2012)


    I hope you know that IDENTITY has no place in RDBMS. It is how non-SQL programmers fake a magnetic tape file in SQL. You also do not know about ISO-11179 naming rules. Is this what you meant if you had a valid schema with a key?

    CREATE TABLE MAS_Shifts

    (facility_id INTEGER NOT NULL,

    shift_name CHAR(3) NOT NULL,

    PRIMARY KEY (facility_id, shift_name),

    shift_type CHAR(5) NOT NULL);

    INSERT INTO MAS_Shifts

    VALUES (1, 'M', 3') , (1, 'N', '3'), ( 1, 'G', '1');

    After that, I have no idea what your question is. Can you try again?

    I hope you know better and will disregard the above misleading advise.

    IDENTITY has a very important place in RDBMS and especially in SQL Server. It's very often the best candidate for a surrogate PK.

    IDENTITY-like structures are implemented in most of the known RDBMS(s) and they have nothing to do with magnetic tape files or/and punch cards!

    _____________________________________________
    "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]