T-SQL Using Cross-Apply with Delete Statement
问题 I have the following tables: RecordID 101 102 103 104 105 106 TableOne 101 102 103 104 TableTwo TableThree 101 102 and I need to delete the RecordsID rows, that are not included in the other tables. Please, note that sometimes the one of the tables TableOne,TableTwo,TableThree could be empty and no records should be deleted then. The result table should be: RecordID 101 102 Because of the empty tables I am not able to use INNER JOIN. And because I am using these code in a function I am not