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:create_table:examples [2010/07/06 17:40]
els
dev:sql:statements:create_table:examples [2016/06/28 22:38] (current)
Line 6: Line 6:
 ====== Omnidex SQL: CREATE TABLE ====== ====== Omnidex SQL: CREATE TABLE ======
  
-[[dev:​sql:​statements:​create_table:​home|Description]] ​-> [[dev:​sql:​statements:​create_table:​syntax|Syntax]] ​-> **[[dev:​sql:​statements:​create_table:​examples|Examples]]**+[[dev:​sql:​statements:​create_table:​home|Description]] ​[[dev:​sql:​statements:​create_table:​syntax|Syntax]] ​| [[dev:​sql:​statements:​create_table:​topics|Topics]] | 
 +**[[dev:​sql:​statements:​create_table:​examples|Examples]]**
  
 ===== Examples ===== ===== Examples =====
Line 17: Line 18:
  
 Parent tables should be declared before children tables. Parent tables should be declared before children tables.
- 
 ===== Typical Example ===== ===== Typical Example =====
  
Line 31: Line 31:
     city            CHARACTER(30) ​  ​QUICKTEXT,​     city            CHARACTER(30) ​  ​QUICKTEXT,​
     state           ​CHARACTER(2) ​   OMNIDEX     state           ​CHARACTER(2) ​   OMNIDEX
-  );+  ) 
 +in "​simple.xml"​;
 </​code> ​   ​ </​code> ​   ​
  
Line 38: Line 39:
 <​code>​ <​code>​
 create table "​HOUSEHOLDS"​ create table "​HOUSEHOLDS"​
-  physical ​  "​dat\households*.dat"​+  physical ​  "​dat/households*.dat"​
   (   (
    "​HOUSEHOLD" ​   character(12),​    "​HOUSEHOLD" ​   character(12),​
Line 60: Line 61:
 <​code>​ <​code>​
 create table "​HOUSEHOLDS"​ create table "​HOUSEHOLDS"​
-  physical ​  "​dat\households*.dat"​+  physical ​  "​dat/households*.dat"​
   (   (
    "​HOUSEHOLD" ​   character(12) ​    ​omnidex,​    "​HOUSEHOLD" ​   character(12) ​    ​omnidex,​
Line 82: Line 83:
 <​code>​ <​code>​
 create table "​HOUSEHOLDS"​ create table "​HOUSEHOLDS"​
-  physical ​  "​dat\households*.dat"​+  physical ​  "​dat/households*.dat"​
   (   (
    "​HOUSEHOLD" ​   character(12) ​    ​omnidex,​    "​HOUSEHOLD" ​   character(12) ​    ​omnidex,​
Line 126: Line 127:
 | CHARACTER(//​n//​) ​       | Space-filled character string of //n// characters ​           | | CHARACTER(//​n//​) ​       | Space-filled character string of //n// characters ​           |
 | CHAR(//​n//​) ​            | Synonym for CHARACTER(//​n//​) ​                                | | CHAR(//​n//​) ​            | Synonym for CHARACTER(//​n//​) ​                                |
-STRING(//​n//​) ​        ​| Null-terminated character string of //n// characters ​        |+| STRING(//​n//​) ​          ​| Null-terminated character string of //n// characters ​        |
 | VARCHAR(//​n//​)* ​        | String of max //n// characters, with length variable ​        | | VARCHAR(//​n//​)* ​        | String of max //n// characters, with length variable ​        |
 | CLOB(//​n//​)* ​           | Character large object of max //n// characters, with length variable | | CLOB(//​n//​)* ​           | Character large object of max //n// characters, with length variable |
Line 153: Line 154:
 | OMNIDEX TIME(//​n//​) ​    | Omnidex proprietary time supporting //n// digits of HHMMSSNN | | OMNIDEX TIME(//​n//​) ​    | Omnidex proprietary time supporting //n// digits of HHMMSSNN |
 | OMNIDEX DATETIME(//​n//​) | Omnidex proprietary datetime supporting //n// digits of YYYYMMDDHHMMSSNN | | OMNIDEX DATETIME(//​n//​) | Omnidex proprietary datetime supporting //n// digits of YYYYMMDDHHMMSSNN |
-| * Omnidex recommends use of the CHARACTER and STRING datatypes rather than VARCHAR and CLOB due to the requirement of a length variable. ||+| * Omnidex recommends use of the CHARACTER and STRING datatypes rather than VARCHAR and CLOB due to the requirement of a length variable. ||
  
 === National Character Datatypes ===  === National Character Datatypes === 
Line 165: Line 166:
 | NATIONAL CHARACTER(//​n//​) | Space-filled character string of //n// characters ​         | | NATIONAL CHARACTER(//​n//​) | Space-filled character string of //n// characters ​         |
 | NATIONAL CHAR(//​n//​) ​     | Synonym for CHARACTER(//​n//​) ​                              | | NATIONAL CHAR(//​n//​) ​     | Synonym for CHARACTER(//​n//​) ​                              |
-| NATIONAL ​STRING(//​n//​) ​ | Null-terminated character string of //n// characters ​      |+| NATIONAL STRING(//​n//​) ​   | Null-terminated character string of //n// characters ​      |
 | NATIONAL VARCHAR(//​n//​)* ​ | String of max //n// characters, with length variable ​      | | NATIONAL VARCHAR(//​n//​)* ​ | String of max //n// characters, with length variable ​      |
 | NATIONAL CLOB(//​n//​)* ​    | Character large object of max //n// characters, with length variable | | NATIONAL CLOB(//​n//​)* ​    | Character large object of max //n// characters, with length variable |
-| * Omnidex recommends use of the NATIONAL CHARACTER and NATIONAL ​STRING datatypes rather than NATIONAL VARCHAR and NATIONAL CLOB due to the requirement of a length variable. ​ ||+| * Omnidex recommends use of the NATIONAL CHARACTER and NATIONAL STRING datatypes rather than NATIONAL VARCHAR and NATIONAL CLOB due to the requirement of a length variable. ​ ||
  
 ==== Indexing Recommendations ==== ==== Indexing Recommendations ====
 
Back to top
dev/sql/statements/create_table/examples.1278438054.txt.gz · Last modified: 2016/06/28 22:38 (external edit)