The DELETE FROM statement deletes rows from a table in an external database, based on a search condition.
A correlation name is created that you can use inside the search condition to refer to the values of columns in the table. This correlation name is either the name of the table (without the data source qualifier) or the explicit qualifier specified.
For further information about handling database errors, see Capturing database state.
DELETE FROM Database.SHAREHOLDINGS AS S WHERE S.ACCOUNTNO = InputBody.AccountNumber;
This removes all the rows from the SHAREHOLDINGS table where the value in the ACCOUNTNO column (in the table) is equal to that in the AccountNumber field in the message. This may delete zero, one, or more rows from the table.