驱动下载
opengauss-jdbc-3.1.0.jar
查看schema下的所有表
SELECT distinct(tablename) FROM pg_tables WHERE SCHEMANAME = 'public';
创建表
CREATE TABLE user (
id INTEGER NOT NULL,
nickname varchar(255) DEFAULT NULL,
username varchar(255) DEFAULT NULL,
password varchar(255) DEFAULT NULL,
usertype INTEGER DEFAULT NULL,
gender char(2) DEFAULT NULL
);
清空表数据
delete from t_user where 1 = 1;
新增数据
insert into t_user values ('10', 'zhangsan', 'zhang3', '123456', '1', 'M');
查看数据
select * from t_user where id = 10;