Examples Query Results using Output Options

The following example query results correspond to the specified output option.

For example, this query SELECT column_int, column_varchar, column_numeric FROM __database_testing__ returns the following formatted Result in the Results Details, Summary panel:

column_int column_varchar column_numeric
1 Oracle 11g 123456.780
2 PostgreSQL "9.3" 234567.890
3 SQL Server 2012 345678.900
4 (null) (null)

In the remaining examples, query results are shown per output type in their raw form, as they are shown in the Result Details, Events List panel.

The query results if the output option is summary or read-and-discard :

The SQL statement was executed successfully. (4 rows affected)

The query results if the output option is csv-with-header :

column_int,column_varchar,column_numeric

1,Oracle 11g,123456.780

2,"PostgreSQL ""9.3""",234567.890

3,SQL Server 2012,345678.900

4,\N,\N

The query results if the output option is csv :

1,Oracle 11g,123456.780

2,"PostgreSQL ""9.3""",234567.890

3,SQL Server 2012,345678.900

4,\N,\N

The query results if the output option is xml :

<Output>

<Results>

<Result>

<Data>

<Row>

<Column value="1" />

<Column value="Oracle 11g" />

<Column value="123456.780" />

</Row>

<Row>

<Column value="2" />

<Column value="PostgreSQL "9.3"" />

<Column value="234567.890" />

</Row>

<Row>

<Column value="3" />

<Column value="SQL Server 2012" />

<Column value="345678.900" />

</Row>

<Row>

<Column value="4" />

<Column value="" isNull="true" />

<Column value="" isNull="true" />

</Row>

</Data>

</Result>

</Results>

</Output>

The query results if the output option is xml-with-summary :

Note: Column sizes are approximate for some column data types.

<Output>

<Results>

<Result>

<Summary>

<Result rowCount="4">

The SQL statement was executed successfully. (4 rows affected)</Result>

<Columns>

<Column name="column_int" type="int2" size="5" />

<Column name="column_varchar" type="varchar" size="255" />

<Column name="column_numeric" type="numeric" size="12" />

</Columns>

</Summary>

<Data>

<Row>

<Column value="1" />

<Column value="Oracle 11g" />

<Column value="123456.780" />

</Row>

<Row>

<Column value="2" />

<Column value="PostgreSQL "9.3"" />

<Column value="234567.890" />

</Row>

<Row>

<Column value="3" />

<Column value="SQL Server 2012" />

<Column value="345678.900" />

</Row>

<Row>

<Column value="4" />

<Column value="" isNull="true" />

<Column value="" isNull="true" />

</Row>

</Result>

</Results>

</Output>

The query results if the output option is json-with-summary :

Note: The Result is one long line. Here, the line is wrapped into multiple lines for easier viewing.

{

"output": {

"results": [

{

"summary": {

"result": {

"rowCount": 4,

"message": "The SQL statement was executed successfully. (4 rows affected)"

},

"columns": [

{

"name": "column_int",

"type": "int2",

"size": 5

},

{

"name": "column_varchar",

"type": "varchar",

"size": 255

},

{

"name": "column_numeric",

"type": "numeric",

"size": 12

}

]

},

"data": [

[

"1",

"Oracle 11g",

"123456.780"

],

[

"2",

"PostgreSQL \"9.3\"",

"234567.890"

],

[

"3",

"SQL Server 2012",

"345678.900"

],

[

"4",

null,

null

]

]

}

]

}

}

The query results if the output option is json :

Note: The Result is one long line. Here, the line is wrapped into multiple lines for easier viewing.

{

"output": {

"results": [

{

"data": [

[

"1",

"Oracle 11g",

"123456.780"

],

[

"2",

"PostgreSQL \"9.3\"",

"234567.890"

],

[

"3",

"SQL Server 2012",

"345678.900"

],

[

"4",

null,

null

]

]

}

]

}

}