Oracle finds records with the same data in several fields in the table [SQL] create table student (id number primary key, name varchar2 (20), gender varchar2 (2); create table student, contains two main fields: name and gender. insert several data records. [SQL] ID NAME GENDER -- ------------------ -- 1 Zhang San male 2 Li Si male 3 Li Si male 4 Li Si female 5 Zhang San female 6 Zhang San male can see that the name of id () is the same as gender, the name and gender of id (2, 3) are the same. Request: list records with the same name and gender. Write SQL [SQL] SQL> SELECT s. name, s. gender 2 FROM student s 3 WHERE (select count (*) 4 FROM student 5 WHERE name = s. name and gender = s. gender)> 1) 6 order by name, gender DESC, in the where clause, subqueries are used to separate two fields as filter conditions, and then all records are obtained directly.