Difference between revisions of "CREATE a new table"
From SQLZOO
(Created page with "CREATE a new table <div class='ht'> <div class=params>schema:gisq</div> <div> The following are examples of field types: <table><tr><td>INTEGER</td><td>A whole number</td></t...") |
|||
| (2 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
CREATE a new table | CREATE a new table | ||
<div class='ht'> | <div class='ht'> | ||
| − | <div class=params>schema: | + | <div class=params>schema:scott</div> |
<div> | <div> | ||
The following are examples of field types: | The following are examples of field types: | ||
| Line 21: | Line 21: | ||
,b VARCHAR(10) | ,b VARCHAR(10) | ||
) | ) | ||
| − | |||
</source> | </source> | ||
<div class="ecomm e-access" style="display: none"> | <div class="ecomm e-access" style="display: none"> | ||
| Line 32: | Line 31: | ||
</div> | </div> | ||
</div> | </div> | ||
| − | {{ | + | |
| + | {{CREATE and DROP ref}} | ||
Latest revision as of 10:42, 16 July 2012
CREATE a new table
schema:scott
The following are examples of field types:
| INTEGER | A whole number |
| VARCHAR(10) | Up to 10 characters. |
| CHAR(10) | Fixed number of characters |
| DATE | A date |
| TIMESTAMP | Date and time |
| FLOAT | Floating point numbers |
DROP TABLE t_test
CREATE TABLE t_test (a INTEGER NOT NULL PRIMARY KEY ,b VARCHAR(10) )
CREATE TABLE t_test (a INTEGER PRIMARY KEY ,b VARCHAR2(10) )
CREATE TABLE t_test (a INTEGER PRIMARY KEY ,b VARCHAR(10) )
CREATE a new table