Mitsubishi Electric MELSEC iQ-R-R00CPU User Manual page 1001

Melsec iq-r series cpu module application user's manual
Table of Contents

Advertisement

UPDATE
This command updates the value of the specified record of the specified table in the database.
*1
Syntax
UPDATE [table name] SET [field name = assigned value], [field name = assigned value], , [field name = assigned value] [option];
*1 When the field value is a character string, enclose it in single quotation marks (').
■Option
Item
Description
WHERE
Specifies the condition to obtain (process) a specific record
( Page 1000 WHERE).
■Application example
• To store a value in "fld1" and "fld3" of the record of "fld2" field value = 935 of table1 (storing fld1 = 20, fld3 = abc)
UPDATE table1 SET "fld1" = 20, "fld3" = 'abc' WHERE "fld2" = 935;
DELETE
This command deletes a record of the specified table in the database.
*1
Syntax
DELETE [table name] [option];
*1 When the field value is a character string, enclose it in single quotation marks (').
■Option
Item
Description
WHERE
Specifies the condition to obtain (process) a specific record
( Page 1000 WHERE).
■Application example
• To delete all records in table1
DELETE "table1";
• To delete the record of the fld3 value = abc in table1
DELETE "table1" WHERE "fld3" = 'abc';
Appendix 14 List of Available SQL Commands for CPU Module Database Access Function
Syntax
WHERE
Syntax
WHERE
A
APPX
999

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents