云数据库 GAUSSDB-UPDATE:示例
时间:2025-03-03 09:51:01
示例
--创建表student1。 openGauss=# CREATE TABLE student1 ( stuno int, classno int ); --插入数据。 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/centralized-devg-v2-gaussdb/gaussdb_42_0507.html