DML is used to add, retrieve, update and manipulate data.The Cinchy DML statements covered on this page are:
IF
The SELECT statement is used to select data from a database. The data returned is stored in a result table, called the result-set.
Note: Table name requires domain prefix.
Syntax
Example
You can create a query that will produce a nested JSON by wrapping it in an outer SELECT statement, such as in the example below.
Note that you should set the return type to "Single Value (First Column of First Row)".
An INSERT statement can be used to add new rows to a table or view
You can also include a SELECT statement to identify that another table or view contains the data for the new row or rows.
Note: The table name requires the domain prefix.
Syntax
Example
The data in a table can be changed by using the UPDATE statement.
The UPDATE statement modifies zero or more rows of a table, depending on how many rows satisfy the search condition that was specified in the WHERE clause.
An UPDATE statement can also be used to specify the values that are to be updated in a single row.
This is done by specifying constants, host variables, expressions, DEFAULT, or NULL. Specify NULL to remove a value from a row's column (without removing the row).
Note: Table name requires domain prefix.
Syntax
Example
A DELETE statement can be used to remove entire rows from a table. The number of rows deleted depends on how many rows satisfy the search condition specified in the WHERE statement.
Note: Table name requires domain prefix.
Syntax
Example
The IF statement is used to execute a condition. If the condition is satisfied then the boolean expressions returns TRUE value. The optional ELSE keyword introduces another statement that is executed when the IF condition is not satisfied and returns FALSE value.
Syntax
Example
The DECLARE statement is used to declare a variable.
Syntax
Example
The SET variable is used to set a value to a variable.
Syntax
Example