Rexx - Delete Operation


Advertisements

The DELETE operation is required when you want to delete some records from your database. The following program shows the procedure to delete all the records from EMPLOYEE where AGE is more than 20.

Example

/* Main program */ 
Call RxFuncAdd 'SQLLoadFuncs', 'rexxsql', 'SQLLoadFuncs' 
Call SQLLoadFuncs 

if SQLConnect(c1,'testuser','test123','testdb') == 0 then say 'Connect Succedded' 
if SQLCommand(u1,"use testdb") == 0 then 
   say 'Changed database to testdb' 
   sqlstr = "DELETE FROM EMPLOYEE WHERE AGE > 20" 
rexx_databases.htm
Advertisements