This is an old revision of the document!


DRAFT

Omnidex SQL: SELECT

Description

Syntax

SELECT expression_list
    FROM data_source
    [ WHERE predicates ]
    [ GROUP BY expression_list ]
        [ HAVING predicates ]
    [ ORDER BY expression_list ]
    [ ON [ CURSOR ] cursor_no ] | [ INSTANCE instance_no ]
    [ WITH options ]
expression_list
       [ DISTINCT column | TOP n | EVERY n | RANDOM n]
       [ UNION [ALL] | INTERSECT | EXCEPT ]
       [ * ] | [ table.]column [column_alias] [, table.column ... ]
       [ (subquery) ]
       [ aggregate_function( [table.]column )
       
FROM table1 [ table_alias ] [, table2 [ table_alias ] [ $omnidex ] ]
     [ LFET | RIGHT ]
         [ OUTER ]
         [ JOIN ]
         [ , table2 ]
         [ ON table1.linkfield = table2.linkfield ]
WHERE 
     [ EXISTS (subquery) ]
     [ IN (subquery) ]
GROUP BY
HAVING [ left_operand operator subquery ]
       [ left_operaand IN (subquery) ]
ORDER BY [column | position ] [, column | position ]

Discussion

FROM data_source
WHERE Clause
GROUP BY Clause
HAVING Clause
ORDER BY Clause
WITH options

Examples

Simple

> select * from mytable

select columns

> select company, contact from mytable
 
Back to top
dev/sql/select.1259597247.txt.gz ยท Last modified: 2012/10/26 14:25 (external edit)