Book Image

Oracle Database XE 11gR2 Jump Start Guide

By : Asif Momen
Book Image

Oracle Database XE 11gR2 Jump Start Guide

By: Asif Momen

Overview of this book

Oracle Database XE 11gR2 is an excellent beginner-level database and is a great platform to learn database concepts. "Oracle Database XE 11gR2 Jump Start Guide" helps you to install, administer, maintain, tune, back up and upgrade your Oracle Database Express Edition. The book also helps you to build custom database applications using Oracle Application Express.Using this book, you will be able to install Oracle Database XE on Windows/Linux operating system.This book helps you understand different database editions and it guides you through the installation procedure with the aid of screenshots. You will learn to interact with the database objects. You will gain a solid understanding of stored sub-programs which is followed by an introduction to Oracle Application Express (APEX). Solid database performance tuning strategies are also discussed in this book followed by backup and recovery scenarios. All in all, "Oracle Database XE 11gR2 Jump Start Guide" delivers everything that you should know to get started with Oracle Database administration.
Table of Contents (20 chapters)
Oracle Database XE 11gR2 Jump Start Guide
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface

Creating and managing tables


Tables are the basic unit that store actual user data. Individual data records are referred to as rows, and fields are referred to as columns. Each table consists of one or more columns and rows.

Connect to example HR schema to execute the examples discussed in this chapter. The following is an example of the CREATE statement to create a new table:

-- Create a new table
CREATE TABLE emp (
emp_no NUMBER, -- Field that will store employee number
emp_name VARCHAR2(50), -- Field that will store employee' name
date_of_birth DATE, -- This will store employee's date of birth
salary NUMBER(10,2) -- Field that will store employee' salary
);

In the preceding code snippet, we have created a new table consisting of four columns. Each column is assigned a data type with respect to the values that it will store. The emp_no column will store only number values, hence the NUMBER data type is assigned. If we have to store an alpha-numeric value, we may consider using VARCHAR2...