Example: FOR-Loop Delete - Teradata Vantage - Analytics Database

SQL Stored Procedures and Embedded SQL

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Publication Date
June 2022
Content Type
SQL Reference
Publication ID
B035-1148-172K
ft:locale
en-US
ft:lastEdition
2023-10-30
dita:mapPath
frc1628111662093.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
ft:sourceId
dita
dita:id
rjx1472253414573
lifecycle
latest
Product Category
Teradata Vantage™
FOR CustCursor AS c_customer CURSOR FOR
  SELECT CustomerNumber
        ,CustomerName
    FROM Customer
DO
  SET hCustNbr = CustCursor.CustomerNumber;
  SET hCustName = CustCursor.CustomerName;
  DELETE FROM Customer WHERE CURRENT OF c_customer;
END FOR;