Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dev:sql:statements:select:home [2010/07/03 22:04]
tdo
dev:sql:statements:select:home [2016/06/28 22:38] (current)
Line 1: Line 1:
 {{page>:​top_add&​nofooter&​noeditbtn}} {{page>:​top_add&​nofooter&​noeditbtn}}
-<html><div align="​center"><​span style="​color:red">​DRAFT</​span></​div></​html>​+{{page>:sql_bar&​nofooter&​noeditbtn}}
 ====== Omnidex SQL Statement: SELECT ====== ====== Omnidex SQL Statement: SELECT ======
-{{page>:​sql_bar&​nofooter&​noeditbtn}} +^See Also:^[[dev:​sql:​statements:​select:​from |FROM clause]]^[[dev:​sql:​statements:​select:​where | WHERE clause ​]]^[[dev:​sql:​statements:​select:​group_by | GROUP BY clause]]^[[dev:​sql:​statements:​select:​order_by | ORDER BY clause ]]^
-^See Also:^FROM clause^WHERE clause^GROUP BY clause^[[dev:​sql:​statements:​select:​order_by | ORDER BY clause ]]^+
  
 ===== Description ===== ===== Description =====
Line 9: Line 8:
  
 Omnidex will automatically optimize the SELECT statement using Omnidex indexes. Omnidex will automatically optimize the SELECT statement using Omnidex indexes.
- 
 ===== Syntax ===== ===== Syntax =====
 The syntax for the Omnidex SELECT statement is the following: The syntax for the Omnidex SELECT statement is the following:
Line 20: Line 18:
       select_list       select_list
       FROM data_source       FROM data_source
-      [ WHERE criteria_list ​+      [ WHERE criteria_specification ​
-      [ GROUP BY group_by_list ​+      [ GROUP BY group_by_specification ​
-          [ HAVING ​having_list ​+          [ HAVING ​having_specification ​
-      [ ORDER BY order_by_list ​]+      [ ORDER BY order_by_specifcation ​]
       [ < UNION [ALL] | INTERSECT | EXCEPT > select_statement ]       [ < UNION [ALL] | INTERSECT | EXCEPT > select_statement ]
       [ ON [ CURSOR ] cursor_no ] | [ INSTANCE instance_no ]       [ ON [ CURSOR ] cursor_no ] | [ INSTANCE instance_no ]
       [ WITH option_list ]       [ WITH option_list ]
 </​code>​ </​code>​
 +
 ==== Select_list syntax: ==== ==== Select_list syntax: ====
 <​code>​ <​code>​
Line 37: Line 36:
          [ $uniquekey | $odxid ]          [ $uniquekey | $odxid ]
 </​code>​ </​code>​
- +==== FROM datasource: ==== 
-==== FROM Clause Syntax: ====+^See:​^[[dev:​sql:​statements:​select:​from | FROM datasource Discussion ]]^
 <​code>​ <​code>​
   FROM table_spec [ table_alias ] [, [table_spec2 [ table_alias ] [ $omnidex ] ]   FROM table_spec [ table_alias ] [, [table_spec2 [ table_alias ] [ $omnidex ] ]
Line 47: Line 46:
 </​code>​ </​code>​
  
-==== WHERE Clause ​Syntax: ====+==== WHERE criteria_specification ​Syntax: ==== 
 +^See:​^[[dev:​sql:​statements:​select:​where | WHERE criteria_specification Discussion ]]^
 <​code>​ <​code>​
   WHERE [ criteria_list ]   WHERE [ criteria_list ]
Line 53: Line 53:
         [ IN (subquery) ]         [ IN (subquery) ]
 </​code>​ </​code>​
-==== GROUP BY/​HAVING ​Clause ​Syntax: ====+==== GROUP BY/​HAVING ​group_by_specification ​Syntax: ==== 
 +^See: ^[[dev:​sql:​statements:​select:​group_by | GROUP BY group_by_specification Discussion]]^
 <​code>​ <​code>​
   GROUP BY group_by_columns   GROUP BY group_by_columns
Line 59: Line 60:
                [ left_operand IN (subquery) ] ]                [ left_operand IN (subquery) ] ]
 </​code>​ </​code>​
-==== ORDER BY Clause ​Syntax: ​ ==== +==== ORDER BY order_by_specification ​Syntax: ​ ==== 
-[[dev:​sql:​statements:​select:​order_by | ###​Order ​By Discussion### ]]+^See:^[[dev:​sql:​statements:​select:​order_by | ORDER By order_by_specfication ​Discussion ]]^
 <​code>​ <​code>​
   ORDER BY [  column_spec | column_position ] [ ASC | DESC ]    ORDER BY [  column_spec | column_position ] [ ASC | DESC ] 
Line 66: Line 67:
 </​code>​ </​code>​
  
-==== WITH Clause Syntax: ====+==== WITH option_list: ====
 <​code>​ <​code>​
-  WITH options+  WITH option_list
 </​code>​ </​code>​
  
Line 82: Line 83:
 | $odxid | | | $odxid | |
  
-==== FROM Clause ==== 
-      ​ 
-The From Datasource can be one of the following: 
-| table_spec | A table using a syntax of [database.]table. | 
-| $OMNIDEX ​  | An internal table automatically created and used for testing consisting of one row and one column. | 
-| (subquery) | A nested subquery. |  
-| JOIN Clause | Joins one or more tables.| 
-==== WHERE Clause ==== 
-The WHERE clause can be used to specify both criteria and table join information. 
- 
-  select * from trans_table where state = '​CA';​ 
  
   ​   ​
 
Back to top
dev/sql/statements/select/home.1278194649.txt.gz · Last modified: 2016/06/28 22:38 (external edit)