Oracle 数据核对测试
主键唯一性检测
select count(distinct pk_id)-count(*) from pk_id_test;
create table student ( sno varchar(10), sname varchar(10), sage date, ssex varchar(10) ); insert into student VALUES ('01','张三','2020-1-1','F'), ('02','历史','2020-2-1','F'), ('02','李四','2020-2-1','F'), ('03','五五','2020-3-1','M'), ('04','赵六','2020-4-1','M'); select * from student; select count(distinct sno)-count(0) from student;