Home > database >  How to use multiple fields query repeat line
How to use multiple fields query repeat line

Time:09-23

Everyone a great god, I am a rookie, as shown in the subject to multiple fields find out duplicate rows, according to the online know has written the following code, but the syntax errors,
Please the great god know,
Select * from feature_data_table d
The where ( d.m achineNo, d.f eatureID, d.d atavalue in
)(select machineNo featureID, datavalue the from feature_data_table
Group by machineNo featureID, datavalue
Having the COUNT (*) & gt; 1)

CodePudding user response:

E.g.
 SELECT * 
The FROM feature_data_table d
WHERE the EXISTS (SELECT 1
The FROM feature_data_table
WHERE machineNo=d.m achineNo
AND featureID=d.f eatureID
AND datavalue=https://bbs.csdn.net/topics/d.datavalue
HAVING the COUNT (*) & gt;=2);

CodePudding user response:

You can run this code is MySQL
  • Related