使用Oracle / sqlplus时在MySQL中显示类似\G的查询结果?

5 oracle sqlplus

在 MySQL 中,您可以使用 \G 来运行查询:

select * from mytable\G
Run Code Online (Sandbox Code Playgroud)

你的结果将显示在倒排表中,有点像这样:

*************************** 1. row ***************************
                 column1: 12345
           another_colum: another value
             yet_another: ABCD
*************************** 2. row ***************************
                 column1: 238479
           another_colum: another value again
             yet_another: WXYZ
Run Code Online (Sandbox Code Playgroud)

有没有办法使用 Oracle / sqlplus 获得类似的格式?

Ton*_*ews 4

Tom Kyte 创建了一个名为print_table的实用程序,它的功能大致相同。