sql07 - 7 7 Creating and Managing Tables 7-2 Objectives...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: 7 7 Creating and Managing Tables 7-2 Objectives Describe the main database objects Create tables Describe the datatypes that can be used when specifying column definition Alter table definitions Drop, rename, and truncate tables 7-3 Database Objects Object Description Table Basic unit of storage; composed of rows and columns View Logically represents subsets of data from one or more tables Sequence Generates primary key values Index Improves the performance of some queries Synonym Gives alternative names to objects 7-4 Naming Conventions Must begin with a letter Can be 130 characters long Must contain only AZ, az, 09, _, $, and # Must not duplicate the name of another object owned by the same user Must not be an Oracle Server reserved word 7-5 The CREATE TABLE Statement You must have : CREATE TABLE privilege A storage area You specify: Table name Column name, column datatype, and column size CREATE TABLE [ schema .] table ( column datatype [DEFAULT expr ]; 7-6 Referencing Another Users Tables Tables belonging to other users are not in the users schema. You should use the owners name as a prefix to the table. 7-7 The DEFAULT Option Specify a default value for a column during an insert. hiredate DATE DEFAULT SYSDATE, Legal values are literal value, expression, or SQL function....
View Full Document

This note was uploaded on 07/15/2011 for the course ECO 2023 taught by Professor Mr.raza during the Summer '10 term at FAU.

Page1 / 21

sql07 - 7 7 Creating and Managing Tables 7-2 Objectives...

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

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