1、创建表,添加,查询
create table StuInfo
(
StuId SERIAL primary key,-- 自动增长列
StuName varchar(20),
Birthday Date,
StuPhone varchar(11)
) insert into StuInfo(StuName,Birthday,StuPhone) values('张三',NOW(),'') -- 添加 SQLite获取系统时间datetime('now') select * from StuInfo -- 查询
2、查询表的所有字段
select a.attname from pg_class as c,pg_attribute as a where c.relname='tablename' and a.attrelid=c.oid and a.attnum>0
3、修改字段名
ALTER TABLE public.ss_db_table RENAME "DT_Name" TO dt_name;