云数据库 GAUSSDB-简版化查询

时间:2025-03-03 09:49:38

简版化查询

通过使用TABLE语法,直接指定具体的表进行查询操作。

该操作与使用SELECT语法进行全表信息简单查询功能一致。

--创建表。
gaussdb=# CREATE TABLE t1(c1 int, c2 int, c3 int); 

--插入数据。
gaussdb=# INSERT INTO t1 VALUES (1,2,3);
 c1 | c2 | c3 
----+----+----
  1 |  2 |  3
(1 row)

--查询表的数据。
gaussdb=# TABLE t1;
 c1 | c2 | c3 
----+----+----
  1 |  2 |  3
(1 row)

--删除。
gaussdb=# DROP TABLE t1;
support.huaweicloud.com/centralized-devg-v8-gaussdb/gaussdb-42-1710.html