Forum Replies Created

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

  • RE: Mutually dependent foreign constraints

    CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT )

    CREATE TABLE t2 (c1 INT PRIMARY KEY, c2 INT )

    ALTER TABLE t1 ADD CONSTRAINT t1t2FK FOREIGN KEY (c2) REFERENCES t2(c1)

    ALTER...

  • RE: Comparing specific rows in 2 tables

    insert into ##temptable

    select relevant.columns

    from table1 inner join table2 on pk1 = pk2

    where table1.createdate = yesterday

    and (table1.col1 <> table2.col1 or

    table1.col2 <> table2.col2 or

    ...

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