SQL Studio


DELETE
DELETE
[TOP  expression] 
FROM entity_logicalname 
[ WHERE <search_condition> ] 
  • To reduce load on the server, the TOP defaults to 10
  • Any WHERE conditions are evaluated. Once all matching records have been identified, deletes are executed.
  • When a from clause contains inner or left joins, this is being converted into MSCRM Query Expressions. So the fields that can be used as criteria are only those availble on the two connecting entities.
Examples
delete from contact 
where contactid in (
'{DC681F5E-8CD0-47A5-B1BC-2367C50C39E3}',
'4E6B140B-CF2C-4D44-9084-F6C27C5934C0'
)