云数据库 GAUSSDB-UPDATE:示例
时间:2025-11-04 09:06:44
示例
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
--创建表student1。 openGauss=# CREATE TABLE student1 ( stuno int, classno int ) DISTRIBUTE BY hash(stuno); --插入数据。 openGauss=# INSERT INTO student1 VALUES(1,1); openGauss=# INSERT INTO student1 VALUES(2,2); openGauss=# INSERT INTO student1 VALUES(3,3); --查看数据。 openGauss=# SELECT * FROM student1; --直接更新所有记录的值。 openGauss=# UPDATE student1 SET classno = classno*2; --查看数据。 openGauss=# SELECT * FROM student1; --删除表。 openGauss=# DROP TABLE student1; |
support.huaweicloud.com/distributed-devg-v2-gaussdb/gaussdb-12-0454.html
下载云数据库 GAUSSDB用户手册完整版