Creatio development guide
PDF
This documentation is valid for Creatio version 7.11.0. We recommend using the newest version of Creatio documentation.

Composing delete data queries

Glossary Item Box

The Delete class is used to delete data from the bpm'online database.

The Delete class constructor uses the following objects as parameters:

  • User connection (Update (UserConnection)).
  • Other object Delete (Delete (Delete)). This will create a copy of an Delete query included in the parameter.

The following are the examples of using the Delete class method used to build queries of varying complexity. In each example a Delete object is created and then an SQL query is provided that will be generated for each different DBMS (MS SQL).

Example 1

ShowC#

var delete = new Delete(userConnection)
        .From("City"); 

ShowMS SQL

DELETE FROM [dbo].[City]

Example 2

ShowC#

var delete = new Delete(userConnection)
        .From("City")
        .Where("Id").IsEqual(Column.Parameter("{210299B0-7A24-4C4D-9B6F-658FEFEF2E13}")); 

ShowMS SQL

DELETE FROM [dbo].[City] WHERE [Id] = @P1
© bpm'online 2002-2018.

Did you find this information useful?

How can we improve it?