The content of this page has been automatically translated by AI. If you encounter any problems while reading, you can view the corresponding content in Chinese.

delete

Last updated: 2024-10-15 17:39:19

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

Please refer to the error code list.

Example

tcaplus> delete from table_list where uin=99 and name = "99" and key1=99 and -index=0;

delete success

delete time: 10263 us

tcaplus> delete from table_generic_xiahuaxian where _uin=99 and name = "danmi_test_1" and _key3=4 by partkey;

delete success

delete time: 14405 us