Rexx - Insert Operation

It is required when you want to create your records into a database table.

The following example will insert a record in the employee table.


/* 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 = "INSERT INTO employee(first_name,last_name,age,sex,income) values 

say SQLCommand(c2,sqlstr) 

if you look into the MySQL testDB database, you will see that the record has been inserted.