[TDR Generic Table] [MySQL Protocol Compatibility Interface] Insert Records
1. Interface Description
Insert new records into a specified table
When data with the same Key already exists in the table, the data insertion will fail.
2. Preparations
Refer to Preparation document, create mysql_table table, and use MySQL Client to connect to TcaplusDB successfully.
3. SQL Examples
When inserting recordd into mysql_table table, the SQL statements have the following two forms:
INSERT INTO mysql_table (k1, k2, k3, v1, v2, v3, v4) VALUES (1, 2, 'one', 4, 5, 6.6, 'value4');
INSERT INTO mysql_table (k1, k2, k3, v1, v2, v3, v4) VALUES (1, 2, 'one', 4, 5, 6.6, 'value4') ON DUPLICATE KEY UPDATE;
It can also send multiple record insertion requests to TcaplusDB at one time, as follows:
INSERT INTO mysql_table (k1, k2, k3, v1, v2, v3, v4) VALUES (1, 2, 'one', 4, 5, 6.6, 'value4');INSERT INTO mysql_table (k1, k2, k3, v1, v2, v3, v4) VALUES (1, 2, 'two', 4, 5, 6.6, 'value4');
4. FAQ
For details, see Meaning and Handling of Error Codes.
6. Other Reference Documents
[TDR Generic Table][C++ SDK] Interface Description for Inserting a Record.
[TDR Generic Table] [Java SDK] Interface Description for Inserting a Record
[TDR Generic Table][Go SDK] Interface Description for Inserting a Record.