0

I want to be able to delete "all" the records from the results of the query below. So if I find two John Smiths with same date of birth, delete them both.

Select LastName, FirstName, DateOfBirth, Count () As Duplicates From PatientDemographics2 Group by FirstName, LastName, DateOfBirth Having count () >1 Order by LastName, FirstName Asc

John Molina
  • 179
  • 3
  • 14

1 Answers1

0

To remove one or more rows in a table: First of all you will have to specify the table name where you want to remove data in the DELETE FROM clause. Fuethermore if you put the conditions remark "WHERE" clause it specifies which rows to remove. If you omit the WHERE clause, the statement will remove all rows in the table.

Jim Hayes
  • 2,126
  • 1
  • 15
  • 21
leozory
  • 1
  • 1
  • 1
    This answer could be improved by providing an SQL example, rather than just describing what it would look like. – Jim Hayes Sep 22 '19 at 01:32