Creating a Table : Create Table « Table « Oracle PL/SQL Tutorial

Oracle PL/SQL Tutorial
1. Introduction
2. Query Select
3. Set
4. Insert Update Delete
5. Sequences
6. Table
7. Table Joins
8. View
9. Index
10. SQL Data Types
11. Character String Functions
12. Aggregate Functions
13. Date Timestamp Functions
14. Numerical Math Functions
15. Conversion Functions
16. Analytical Functions
17. Miscellaneous Functions
18. Regular Expressions Functions
19. Statistical Functions
20. Linear Regression Functions
21. PL SQL Data Types
22. PL SQL Statements
23. PL SQL Operators
24. PL SQL Programming
25. Cursor
26. Collections
27. Function Procedure Packages
28. Trigger
29. SQL PLUS Session Environment
30. System Tables Data Dictionary
31. System Packages
32. Object Oriented
33. XML
34. Large Objects
35. Transaction
36. User Privilege
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Oracle PL/SQL Tutorial » Table » Create Table 
6. 1. 1. Creating a Table

The simplified syntax for the CREATE TABLE statement is as follows:

CREATE [GLOBAL TEMPORARYTABLE table_name (
  column_name type [CONSTRAINT constraint_def DEFAULT default_exp]
  [, column_name type [CONSTRAINT constraint_def DEFAULT default_exp]...]
)
[ON COMMIT {DELETE | PRESERVEROWS]
TABLESPACE table_space;

where

  1. GLOBAL TEMPORARY specifies that the table's rows are temporary and such tables are known as temporary tables.
  2. The duration of the contents are specified by the ON COMMIT clause.
  3. A temporary table is visible to all sessions, but rows are specific to a session.
  4. type specifies the type of a column.
  5. constraint_def specifies the definition of a constraint on a column.
  6. default_exp specifies the expression used to assign a default value to a column.
  7. ON COMMIT controls the duration of the rows in a temporary table.
  8. DELETE specifies the rows are deleted at the end of a transaction.
  9. PRESERVE specifies the rows are deleted at the end of a session.
  10. If you omit ON COMMIT for a temporary table, the default is DELETE.
6. 1. Create Table
6. 1. 1. Creating a Table
6. 1. 2. Create table with storage setting
6. 1. 3. Create table with storage setting 2
6. 1. 4. Create an external table
6. 1. 5. Create copy table
6. 1. 6. Create a table from one or more other tables
6. 1. 7. Rename a table
6. 1. 8. One column with three constraints
6. 1. 9. Use referencing columns
6. 1. 10. Create a table based on a hash cluster
6. 1. 11. Create table with 'organization index OVERFLOW'
6. 1. 12. Create table with 'organization index'
6. 1. 13. Cascade delete setting
6. 1. 14. Demonstrate a simple External table
6. 1. 15. Create intermediate table for calculation
6. 1. 16. Make myCode a CACHE table.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.