Products

DRDS

2022-02-22 09:44:22

DRDS DML SQL syntax

INSERT

The field name must be added after the table name when a split table is inserted in DRDS, otherwise the SQL will be refused to execute


-- Correct SQL
insert into ddl_demo1 (id,name) values (1,'abc');

-- Wrong SQL
insert into ddl_demo1  values (100,'abc');

DELETE,UPDATE,SELECT

It is recommended to include a split field in the where statement. In this way, DRDS will send the SQL statement to the appropriate sub-database sub-table according to the value of the split field, which can improve the SQL efficiency. For example:


select id,name from ddl_demo1
where id =100;

update ddl_demo1
set name = 'efg'
where id = 100;

delete from ddl_demo1
where id =100;
Feedback

开始与售前顾问沟通

可直接拨打电话 400-098-8505转1

我们的产品专家为您找到最合适的产品/解决⽅案

在线咨询 5*8⼩时

1v1线上咨询获取售前专业咨询

点击咨询
企微服务助手

专业产品顾问,随时随地沟通