✏️ Explanatory Question
The update table method updates the current record with the contents of the buffer. It also updates the appropriate system fields.
The where clause is optional. When used, the where clause specifies a condition for update to test while processing each row of the table. Only those rows that test true against the condition are updated with the new values.
update_recordset is a record-set based operator—it updates multiple records at once.
To override the behavior of update, use the doUpdate method.
EmployeeTable empdet;
empdet.EmpId = "E002";
empdet.EmpName = "Osman Ali Sk";
empdet.DeptId = "D001";
empdet.insert();
info("Data Inserted");
CustTable custTable;
ttsBegin;
select forUpdate custTable
where custTable.AccountNum == '4000';
custTable.CreditMax = 5000;
custTable.update();
ttsCommit;
EmployeeTable empdet;
DepartmentMy dept;
insert_recordset empdet (DeptId)
select DeptId from dept;
info("Data Copied");