Open topic with navigation

TIBCO ActiveSpaces® - Enterprise Edition 5.0.0

# Session Statement

A Statement is created from a Session object and is not tied to a particular table object. A Session statement is created by using a SQL SELECT string and the table for the query is determined by parsing the SELECT string.

The SQL SELECT string supported has the form:

    SELECT <select list> <from clause> [<where clause>] [<group by clause>] [<order by clause>] [<limit clause>]

For a complete description of each component of the SELECT syntax, see the subsections under The SQL SELECT Statement.

For more information about statements, see Statement.

## Advantages of a Session Statement over a Table Iterator

Using a Session statement to run SQL SELECT statements has the following advantages over using a table iterator:

- You do not have to create a Table object before you can query a table.
- The same query can be run multiple times using a single Statement object.
- To aid with data security, you can use parameters to decouple the query from the data values used in the query.
- Parameters can be used to vary the result of your query each time it is run.
- You can specify a subset of the columns of a table to be returned in the rows of the query results.
- Aggregation functions can be applied to the query results.
- A GROUP BY clause can be used to aggregate the results of a query.
- An ORDER BY clause can be used to sort the results of a query.
- A LIMIT clause can be used to set an upper bound to the number of rows a query can return.

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO ActiveSpaces® - Enterprise Edition

Copyright © 2009-2025. Cloud Software Group, Inc. All Rights Reserved.