How_to_create_table_in_Oracle

How_to_create_table_in_Oracle - How to create table in...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
How to create table in Oracle The format for the create table statement is Create table is a keyword which is followed by a table name. In parenthesis, you list the name and data type for each column. Each column corresponds to an attribute in your entity relationship diagram. The column and table name are not case sensitive. Yet, it’s a good idea to be consistent when you write a program. The constraints in this statement are optional (you will not get a syntax error if you omit them), and we will discuss this topic later in the course. The most common data types are Char (size) Varchar (size) Date Number Number (size, d) – for the decimal numbers Difference between char and varchar Char is the fixed length data type, while the varchar is a variable length. When the length is fixed, the storage is allocated for the specified size of the column. With varchar, the space is allocated based on the actual length of the entered value. With both data types, the length of the values can’t exceed the specified size. Let’s look at some examples.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/22/2009 for the course DBST DBST 651 taught by Professor Yelena - ta during the Spring '09 term at MD University College.

Page1 / 2

How_to_create_table_in_Oracle - How to create table in...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online