I like to compare if two indexes from both users are identical. Is there any way to to that. I need similer to below query:
select CASE (2*(select count(*) from (select * from XPKTBL_A INTERSECT select * from XPKTBL_A )) - (select count(*) from XPKTBL_A ) - (select count(*) from XPKTBL_A )) WHEN 0 THEN 'Indexes are identical' ELSE 'Indexes are different' END "Result" from DUAL;
UserA:
create table TBL_A ( FIELD_A1 number not null,
FIELD_A2 varchar2(50),
FIELD_A3 date,
FIELD_A4 number(5,2) default 0,
FIELD_A5 varchar2(10) not null
);
create unique index XPKTBL_A on TBL_A (FIELD_A1);
UserB:
create table TBL_A ( FIELD_A1 number not null,
FIELD_A2 varchar2(20),
FIELD_A4 number(5,2) not null,
FIELD_A5 varchar2(10),
FIELD_A6 number(2) not null
);
create unique index XPKTBL_A on TBL_A (FIELD_A1, FIELD_A6);