DML Statements
INSERT
Skyvia supports INSERT statements. You don’t need to specify values for all table fields in the INSERT statement, you can omit fields that are not required by the target cloud source. The RETURNING clause in INSERT statements is supported. INSERT … SELECT statement is NOT supported.
The following example creates a new Salesforce Contact:
1
2
3
4
5
6
7
8
9
INSERT INTO Contact
(FirstName, LastName, Phone, Email)
VALUES
(
'John',
'Smith',
'(650) 450-8820',
'johnsmith@devart.com'
)
UPDATE
Skyvia supports creating UPDATE statements with complex WHERE clauses with numerous conditions united with logical operators. It supports various comparison operators for conditions. The FROM clause in UPDATE statements is not supported. The RETURNING clause in UPDATE statements is supported.
UPDATE statements can update more than one record in Skyvia. Specifying Id values in the WHERE clause is not required, though adding them improves the performance of UPDATE statements.
The following example increases all prices in a specific Salesforce Pricebook2 by 5%:
1
2
UPDATE PricebookEntry SET unitprice = round(unitprice * 1.05, 2)
WHERE pricebook2id = '01sA000000026tGIAQ'
DELETE
Skyvia supports creating DELETE statements with complex WHERE clauses with numerous conditions united with logical operators. It supports various comparison operators for conditions.
DELETE statements can delete more than one record in Skyvia. Specifying Id values in the WHERE clause is not required, though adding them improves the performance of DELETE statements.
The following example deletes all Salesforce contacts not assigned to accounts:
1
DELETE FROM Contact WHERE AccountID IS NULL
The following example deletes several Salesforce accounts with specified Ids:
1
2
DELETE FROM "Account"
WHERE "Id" in ('001A000001HSpZUIA1', '001A000001HSpZoIAL', '001A000001HSpdTIAT')