Introduction
Update a record in the table. You can operate by using display declaration parameters or passing in a file.
Syntax
## Display the declared field value to update the corresponding recordupdate table set value1 = 1, value2 = "abc", value3 = 0x123456 where key1 = 1 and key2 = "abc" and [-index = 1];## Import a CSV file to replace the corresponding recordupdate table infile filename [where -index = 0];## Import an XML file to replace the corresponding recordupdate table infile filename [where -index = 0] using tdr;
Parameters
Parameters | Protobuf | TDR | Required |
table | Table name | Table name | Yes |
key | Primary key column name. All key values must be filled in | Primary key column name. All key values must be filled in | Yes |
value | Non-primary key field name | Non-primary key field name | At least one or* |
-index | LIST Table: Must specify "-index" to replace the specified record GENERIC Table: Not supported | LIST Table: If "-index" is specified, it will return the record at the specified index for the same key. If not specified, it will return all records GENERIC Table: Not supported | No |
using tdr | Not supported. | Output data in XML format. The file structure must strictly comply with XML syntax. This operation requires providing a TDR file when starting the client | No |
infile | Read data from file | Read data from file | No |
Errors
Example
tcaplus> update table_list set level=99 and count= 88 where uin=99 and name = "99" and key1=99 and -index=0;update successupdate time: 117086 us