zoukankan      html  css  js  c++  java
  • PostgreSQL基础命令

    1. 查看数字库和表

    切换用户postgres
    su postgres
    执行psql进入后台(就像执行mysql进入后台一样)

    2. 更新postgres密码

    password

    3. 创建数据库用户及密码

    create user 用户名称 with password '123456';

    4. 创建数据库及所有者

    create database 数据库名称 owner 用户名称;

    5. 删除数据库用户

    drop user 用户名称

    6. 查看数据库列表

    l

    7. 查看数据库列表的详细信息

    l+

    8. 查看当前数据库用户信息

    du

    9. 查看当前数据库中的所有数据表

    dt

    10. 查看单张数据表的结构

    d 表名

    11. 修改数据表的某一列名称

    alter table cdr rename column account_code to accoutcode;

    12. 持续更新...

  • 相关阅读:
    HDU 4705 Y
    POJ 3614 Sunscreen
    Aizu 2170 Marked Ancestor
    POJ 3616 Milking Time
    POJ 2385 Apple Catching
    POJ 2229 Sunsets
    HDU 4678 Mine
    树的重量
    579Div3
    迷途之家2019联赛
  • 原文地址:https://www.cnblogs.com/yoyotl/p/7743398.html
Copyright © 2011-2022 走看看