Getting started - Table Creation

"Table" is basic structure that is used by SQL to store and represent data. It is similar to 2- dimensional array and consists of rows and columns.

Table: Structure
           Column1  Column2  Column3.................................
Row1    Data         Data        Data
Row2    Data         Data        Data
Row3    Data         Data        Data 
.
.
.

How to create table: Syntax


CREATE TABLE <table_name> (
<column_name_1> <data_type_1>,
<column_name_2> <data_type_2>,
<column_name_N> <data_type_N> );

For Ex:

CREATE TABLE employee(
Empid number,
Name varchar2(100),
Birth_date date,
Gender varchar2(15) );

No comments:

Post a Comment