Creating Tables

Sunday, January 31, 2010 ·

You create tables with the SQL CREATE TABLE statement. With Oracle Database XE, you have two options for creating tables.

* Use the graphical interface that generates the SQL statement
* Enter the CREATE TABLE statement in the SQL Workshop tool

When creating tables, you must provide:

* Table name
* Column name(s)
* Data types for each column

Guidelines for creating tables:

* Table and column naming rules

Must start with a letter, which is followed by a sequence of letters, numbers, _, #, or $

Must be 1 to 30 characters long

Must not be an Oracle server reserved password


* Most common data types

VARCHAR2
NUMBER
DATE
TIMESTAMP
CHAR



You can also set up constraints on your columns to control the data in them.

0 comments: