The select Fcode form TB
Group by Fcode, Ftype
Having a count (Fcode) & gt; 1
Then I want to delete redundant lines, such as a picture in the first line, how do I write a delete statement?
CodePudding user response:
delete a
The from TB a
Where
The exists (select 1 from TB where b=a.f code b. code and a.f type=b. type and a.c time & lt; The biggest time)