EXPAND
Formats query output vertically. For each row, the column values are listed vertically. Use this command to read wide data. To show the current expand setting, run EXPAND without specifying ON or OFF.
Synopsis
EXPAND [ ON | OFF ]
Syntax legend
Syntax conventions | Description |
---|---|
UPPERCASE |
Literal keyword. |
Lowercase |
Not literal. |
|
Variable value. Replace with a user-defined value. |
|
Optional.
Square brackets ( |
|
Group.
Parentheses ( |
|
Or.
A vertical bar ( |
|
Repeatable.
An ellipsis ( |
|
Single quotation ( |
|
Map collection.
Braces ( |
Set, list, map, or tuple.
Angle brackets ( |
|
|
End CQL statement.
A semicolon ( |
|
Separate the command line options from the command arguments with two hyphens ( |
|
Search CQL only: Single quotation marks ( |
|
Search CQL only: Identify the entity and literal value to overwrite the XML element in the schema and solrConfig files. |
ON
-
Enable expand.
OFF
-
Disable expand.
Examples
View rows vertically:
EXPAND ON
Select all rows from the cycling race winners table:
SELECT *
FROM cycling.race_winners;
Each field is shown in a vertical row table:
@ Row 1
---------------+--------------------------------------------------
race_name | National Championships South Africa WJ-ITT (CN)
race_position | 1
cyclist_name | {firstname: 'Frances', lastname: 'DU TOUT'}
@ Row 2
---------------+--------------------------------------------------
race_name | National Championships South Africa WJ-ITT (CN)
race_position | 2
cyclist_name | {firstname: 'Lynette', lastname: 'BENSON'}
@ Row 3
---------------+--------------------------------------------------
race_name | National Championships South Africa WJ-ITT (CN)
race_position | 3
cyclist_name | {firstname: 'Anja', lastname: 'GERBER'}
@ Row 4
---------------+--------------------------------------------------
race_name | National Championships South Africa WJ-ITT (CN)
race_position | 4
cyclist_name | {firstname: 'Ame', lastname: 'VENTER'}
@ Row 5
---------------+--------------------------------------------------
race_name | National Championships South Africa WJ-ITT (CN)
race_position | 5
cyclist_name | {firstname: 'Danielle', lastname: 'VAN NIEKERK'}
(5 rows)
Turn off vertical expansion:
EXPAND OFF