Tuesday, January 4, 2022

Delete Join 2 tables SQL Server

 DELETE M

  FROM MainTable M
  LEFT OUTER JOIN SecTable S     ON M.MainTableId = S.Id
where S.Id IS NOT NULL


No comments: