Cisco Cisco Firepower Management Center 2000 Guía Del Desarrollador
2-12
FireSIGHT System Database Access Guide
Chapter 2 Setting Up Database Access
Querying the Database
Supported SELECT Statement Syntax
The following represents the supported MySQL
SELECT
statement syntax you can use when querying the
Cisco database:
SELECT
[ALL | DISTINCT]
select_expr [
,
select_expr ...]
FROM
table_references
[WHERE where_condition]
[GROUP BY { column_name | position } [ ASC | DESC ], …]
[HAVING where_condition]
[ORDER BY { column_name | position } [ ASC | DESC ], …]
[LIMIT { [offset,] row_count | row_count OFFSET offset}]
The following table details the required syntax for the clauses and arguments in the above
SELECT
statement.
Table 2-4
Supported SELECT Statement Syntax
Where...
Is...
select_expr
{column_name [[AS] alias] | function(...) [[AS] alias] | aggregate_function(...)
[[AS] alias]}
column_name
the name of a field you are querying
function
{ABS | CAST | CEILING | CHAR_LENGTH | COALESCE | CONV | CHARACTER_LENGTH |
CONCAT | CONVERT | CURRENT_DATE | CURRENT_TIME | CURRENT_TIMESTAMP | EXTRACT |
FLOOR | HEX | INET_ATON | INET_NTOA | INET6_ATON | INET6_NTOA | LEFT | LOWER |
LPAD | MID | MOD | NULLIF | OCTET_LENGTH | POSITION | RIGHT | ROUND | SUBSTRING
| SYSDATE | TIME | TIMESTAMP | TRIM | UPPER}
aggregate_function
{AVG | COUNT | COUNT(DISTINCT) | MAX | MIN | SUM}
table_references
one of:
•
table_reference INNER JOIN table_reference join_condition
•
table_reference LEFT [OUTER] JOIN table_reference join_condition
table_reference
table_name [[AS] alias]
table_name
the name of a table you are querying
join_condition
ON conditional_expr
conditional_expr
an equality comparison between fields that are join-compatible; see
for more information
where_condition
one of:
•
IS NULL
or
IS NOT NULL
•
NOT, !
•
BETWEEN ... AND ...
•
LIKE
•
=, !=, <>, >, >=, <, <=