Current location - Loan Platform Complete Network - Big data management - A field in the sql table has the same value. How to compile a query if you want to extract items with the same value?
A field in the sql table has the same value. How to compile a query if you want to extract items with the same value?
What the landlord means is not to rule out duplicate inquiries, but to find duplicates, everyone.

If duplication is ruled out, the landlord will check the manual for distinguishing keywords upstairs with detailed information.

If you want to find duplicates, you need a subquery. Let's do the experiment with the sample database Northwind.

Select * From Orders Where Exists(Select * From Orders AS Temp Where Temp。 OrderID & lt& gt order. Order number and provisional order. CustomerID = order. CustomerID)

-

Select * From table Where Exists(Select * From table AS Temp Where Temp。 unique identification

You must have a unique identifier. If not, you can build one temporarily. This method is not recommended for a large number of data.