命令 | 功能 |
---|---|
\q | quit psql |
\! [COMMAND] | execute command in shell or start interactive shell |
\prompt [TEXT] NAME | prompt user to set internal variable |
\l[+] [PATTERN] | list databases |
\d[S+] | list tables, views, and sequences |
\d[S+] NAME | describe table, view, sequence, or index |
\echo [-n] [STRING] | write string to standard output (-n for no newline) |
\i FILE | execute commands from file |
\ir FILE | as \i, but relative to location of current script |
\h [NAME] | help on syntax of SQL commands, * for all commands |
psql常用命令
最新推荐文章于 2024-05-02 11:50:31 发布
"本文详细介绍了PostgreSQL的一些常用命令,包括退出psql(q)、在shell中执行命令(!)、设置内部变量(prompt)、列出数据库(l)、查看表和视图(d)、描述数据结构(d+)、输出字符串(echo)、执行文件(i和ir)以及获取SQL命令帮助(h)。这些命令对于日常数据库管理和交互操作至关重要。"
摘要由CSDN通过智能技术生成