[askdba] Compare columns of 2 identical tables

  • From: Rajesh Puneyani <rajpuneyani@xxxxxxxxx>
  • To: askdba@xxxxxxxxxxxxx
  • Date: Tue, 2 Nov 2004 15:05:48 -0500

Hi guys,

I have 2 tables (Policy and Arch_policy). They would always be
identical in structure.

I have to write a procedure (PK column values to be passed in the
procedure) to  compare retrieved row from those tables. I have to
compare column by column and report all those columns which differ in

But the catch is it has to be dynamic ...i mean..the structure of the
tables may change (new columns may be added, columns may be dropped)
but still this procedure should keep reporting differences all the

I hope I am clear.

Can anyone please help me in designing such a procedure.

Other related posts: