October 2002
Beginner
864 pages
18h 41m
English
The process of creating a table is far more standardized than the CREATE DATABASE statement. Here's the basic syntax for the CREATE TABLE statement: |
CREATE TABLE table_name
( field1 datatype [ NOT NULL ],
field2 datatype [ NOT NULL ],
field3 datatype [ NOT NULL ]...)
A simple example of a CREATE TABLE statement follows:
SQL> CREATE TABLE BILLS ( 2 NAME CHAR(30), 3 AMOUNT NUMBER, 4 ACCOUNT_ID NUMBER); Table created.
MySQL example:
mysql> create table bills
-> (name char(30),
-> amount numeric,
-> account_id numeric);
Query OK, 0 rows affected (0.07 sec)
This statement creates a table named ... |
Read now
Unlock full access