Introduction
Delete a record from the table based on the specified key. If -index is not specified, then all records matching the criteria will be deleted.
Syntax
delete from table where key1 = 1 and key2 = "abc" [and -index = 1] [by partkey];
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, the record at the specified index under the same key will be returned. If "-index" is not specified, all records will be returned GENERIC Table: Not supported | No |
by partkey | Not supported. | LIST Table: Not supported GENERIC Table: Delete records by partial key of the table | No |
Errors
Example
tcaplus> delete from table_list where uin=99 and name = "99" and key1=99 and -index=0;delete successdelete time: 10263 ustcaplus> delete from table_generic_xiahuaxian where _uin=99 and name = "danmi_test_1" and _key3=4 by partkey;delete successdelete time: 14405 us