OpenGauss数据库-4.表的创建、修改与删除

第1关:创建表

gsql -d postgres -U gaussdb -W 'passwd123@123'
create database testdb;
\c testdb;
passwd123@123
create table test_table (test_id integer not null,test_info char(36));

第2关:修改表 

gsql -d testsb -U gaussdb -W 'passwd123@123'
alter table test_table alter column test_id drop not null;
alter table test_table add timestamp integer not null;

第3关:删除表 

gsql -d testdb -U gaussdb -W 'passwd123@123'
drop table test_table;

 

相关推荐

  1. 1.创建删除数据库

    2024-06-15 11:58:01       18 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-06-15 11:58:01       14 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-06-15 11:58:01       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-06-15 11:58:01       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-06-15 11:58:01       18 阅读

热门阅读

  1. springMVC入门案例

    2024-06-15 11:58:01       6 阅读
  2. Node.js环境安装与管理指南

    2024-06-15 11:58:01       10 阅读
  3. 圆锥曲线的分类

    2024-06-15 11:58:01       8 阅读
  4. 深度解析服务发布策略之蓝绿发布

    2024-06-15 11:58:01       7 阅读
  5. 缓存缓存缓存

    2024-06-15 11:58:01       9 阅读
  6. Sklearn基础教程

    2024-06-15 11:58:01       8 阅读
  7. 网络安全突发事件应急预案

    2024-06-15 11:58:01       9 阅读
  8. 智能合约中权限管理不当

    2024-06-15 11:58:01       7 阅读
  9. Git教程II

    2024-06-15 11:58:01       9 阅读
  10. const与static区别

    2024-06-15 11:58:01       7 阅读