Oracle: Create Simple Table Example

Eugene Jul 31, 2026

When it comes to managing and querying data, Oracle's SQL (Structured Query Language) is a powerful tool. One of the fundamental operations in SQL is creating tables, which serve as the building blocks for your database. In this guide, we'll explore how to create a simple table in Oracle using a step-by-step example.

Super Advanced Tableau Tables
Super Advanced Tableau Tables

Before diving into the example, let's briefly understand what a table is in the context of a database. A table is a collection of related data held in a structured format within a database. It consists of columns (attributes) and rows (records).

How Oracle Cards Work: A Simple Guide for Beginners
How Oracle Cards Work: A Simple Guide for Beginners

Creating a Simple Table in Oracle

To create a simple table in Oracle, you'll use the CREATE TABLE statement. This statement allows you to define the table's name, columns, and their data types.

a poster explaining how to start your oracle deck with pictures and instructions on the front
a poster explaining how to start your oracle deck with pictures and instructions on the front

Let's create a simple table named Employees with the following columns:

  • EmployeeID (NUMBER, primary key)
  • FirstName (VARCHAR2)
  • LastName (VARCHAR2)
  • Email (VARCHAR2)
  • HireDate (DATE)
How to Craft a Personal Oracle Deck for Inner Wisdom
How to Craft a Personal Oracle Deck for Inner Wisdom

Table Definition

The table definition includes the table name, column names, and their respective data types. Here's how you can define the Employees table:

Column Name Data Type
EmployeeID NUMBER
FirstName VARCHAR2
LastName VARCHAR2
Email VARCHAR2
HireDate DATE
Create Sample Database on Amazon Redshift Cluster with Sample Data
Create Sample Database on Amazon Redshift Cluster with Sample Data

Creating the Table

Now that we have defined the table, let's create it using the CREATE TABLE statement. Here's the SQL code to create the Employees table:

```sql CREATE TABLE Employees ( EmployeeID NUMBER PRIMARY KEY, FirstName VARCHAR2(50), LastName VARCHAR2(50), Email VARCHAR2(100), HireDate DATE ); ```

In this SQL statement, we specify the data type and size for each column. The PRIMARY KEY constraint ensures that the EmployeeID column contains unique values and helps maintain referential integrity.

Your New Favorite Hobby: Astrology Oracle Deck — Using Free Fonts
Your New Favorite Hobby: Astrology Oracle Deck — Using Free Fonts

Inserting Data into the Table

After creating the table, you can insert data into it using the INSERT INTO statement. Let's insert a few records into the Employees table:

a poster with different types of cards and instructions for each individual's abilities to use
a poster with different types of cards and instructions for each individual's abilities to use
Data Table & Pricing Table Keynote
Data Table & Pricing Table Keynote
a table that has some important things to know about it and how they are used
a table that has some important things to know about it and how they are used
Diy Oracle Cards, Tarot Guidebook, Charmed Book Of Shadows, Angel Oracle Cards, Tarot Cards Art, Angel Messages, Witch Books, Diy Crafts For Kids Easy, Positive Messages
Diy Oracle Cards, Tarot Guidebook, Charmed Book Of Shadows, Angel Oracle Cards, Tarot Cards Art, Angel Messages, Witch Books, Diy Crafts For Kids Easy, Positive Messages
Step-by-Step Guide to Creating Custom Oracle Card Decks with Canva
Step-by-Step Guide to Creating Custom Oracle Card Decks with Canva
Data - SELF JOIN is used when a table needs to connect back to itself.  A common example: employees and managers stored in the same table.  Here, the employees table is used twice:  e = the employee row m = the manager row from the same table  The LEFT JOIN keeps every employee, even if they do not have a manager.  That’s why Oliver still appears with NULL as the manager name.  Save this if you are learning SQL joins step by step.  #SQL #SQLTips #Database #DataAnalytics #LearnSQL #DataDrivenInsights | Facebook
Data - SELF JOIN is used when a table needs to connect back to itself. A common example: employees and managers stored in the same table. Here, the employees table is used twice: e = the employee row m = the manager row from the same table The LEFT JOIN keeps every employee, even if they do not have a manager. That’s why Oliver still appears with NULL as the manager name. Save this if you are learning SQL joins step by step. #SQL #SQLTips #Database #DataAnalytics #LearnSQL #DataDrivenInsights | Facebook
Table concept
Table concept
a pink poster with instructions on how to use the oraclel spreads for oraclel
a pink poster with instructions on how to use the oraclel spreads for oraclel
DIY Oracle Cards – Need a Quick Oracle Deck Idea?
DIY Oracle Cards – Need a Quick Oracle Deck Idea?
Create Your Own Oracle Card DIY Kit Today – Easy & Fun Tarot Crafting
Create Your Own Oracle Card DIY Kit Today – Easy & Fun Tarot Crafting
the three card oracle spread is shown on a black background with gold lettering and numbers
the three card oracle spread is shown on a black background with gold lettering and numbers
25,200+ Excel Table Stock Illustrations, Royalty-Free Vector Graphics & Clip Art - iStock
25,200+ Excel Table Stock Illustrations, Royalty-Free Vector Graphics & Clip Art - iStock
How To Create A Beautiful Oracle Deck In 8 Steps — The Traveling Witch
How To Create A Beautiful Oracle Deck In 8 Steps — The Traveling Witch
Responsive Table V2 - Free HTML/CSS Table Template 2026 - Colorlib
Responsive Table V2 - Free HTML/CSS Table Template 2026 - Colorlib
6 Best Practices for Enterprise Table UX Design - Denovers | Denovers
6 Best Practices for Enterprise Table UX Design - Denovers | Denovers
the diagram shows how to make a tarot and oracle spread
the diagram shows how to make a tarot and oracle spread
7 Steps to Create Your Own Oracle
7 Steps to Create Your Own Oracle
7 Card Oracle Card Spread
7 Card Oracle Card Spread
an advertisement for oracle's tarot cards with instructions on how to use them
an advertisement for oracle's tarot cards with instructions on how to use them
How To Create An Oracle Deck For Beginners
How To Create An Oracle Deck For Beginners

```sql INSERT INTO Employees (EmployeeID, FirstName, LastName, Email, HireDate) VALUES (1, 'John', 'Doe', 'john.doe@example.com', TO_DATE('2020-01-01', 'YYYY-MM-DD')); INSERT INTO Employees (EmployeeID, FirstName, LastName, Email, HireDate) VALUES (2, 'Jane', 'Smith', 'jane.smith@example.com', TO_DATE('2021-02-15', 'YYYY-MM-DD')); ```

In these examples, we use the TO_DATE function to convert the date strings into Oracle's DATE data type.

Querying the Table

Once you have inserted data into the table, you can query it using the SELECT statement. Here's how you can retrieve all the records from the Employees table:

```sql SELECT * FROM Employees; ```

This query will return all the columns and rows from the Employees table.

Creating and managing tables is an essential aspect of working with databases. By following this guide, you now know how to create a simple table in Oracle and insert data into it. As you become more comfortable with Oracle SQL, you can explore more advanced topics like creating indexes, constraints, and complex queries.

Happy coding, and remember to keep exploring and learning to make the most of Oracle's powerful SQL capabilities!