人大金仓CKA04-命令行工具KSQL 05-用户与角色 06-对象访问权限 07-库、模式、表空间

04-命令行工具KSQL

\c 切换
在这里插入图片描述
环境变量

export KINGBASE_HOST=x.x.x.x
export KINGBASE_PORT=54321
export KINGBASE_DATABASE=test
export KINGBASE_USER=system

当前会话信息

SELECT inet_client_addr(),inet_client_port(),inet_server_addr(),inet_server_port(),current_database(),current_user;

表、视图、序列、索引

\d[S+]  NAME           describe table, view, sequence, or index

group已弃用
在这里插入图片描述

\s
\s [FILE] display history or save it to file

 \?
General
  \copyright             show Kingbase usage and distribution terms
  \crosstabview [COLUMNS] execute query and display results in crosstab
  \errverbose            show most recent error message at maximum verbosity
  \g [FILE] or ;         execute query (and send results to file or |pipe)
  \gdesc                 describe result of query, without executing it
  \gexec                 execute query, then execute each value in its result
  \gset [PREFIX]         execute query and store results in ksql variables
  \gx [FILE]             as \g, but forces expanded output mode
  \q                     quit ksql
  \watch [SEC]           execute query every SEC seconds

Help
  \? [commands]          show help on backslash commands
  \? options             show help on ksql command-line options
  \? variables           show help on special variables
  \h [NAME]              help on syntax of SQL commands, * for all commands

Query Buffer
  \e [FILE] [LINE]       edit the query buffer (or file) with external editor
  \ef [FUNCNAME [LINE]]  edit function definition with external editor
  \ev [VIEWNAME [LINE]]  edit view definition with external editor
  \p                     show the contents of the query buffer
  \r                     reset (clear) the query buffer
  \s [FILE]              display history or save it to file
  \w FILE                write query buffer to file

Input/Output
  \copy ...              perform SQL COPY with data stream to the client host
  \echo [STRING]         write string to s
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值