As we all know, SQL works on RDBMS functionality. That means data in the database need to be stored using tables.
The CREATE TABLE keyword in SQL is to create tables.
Oracle Create Table Syntax
Create table Table_name(
column_1 datatype(size),
column_2 datatype(size),
column_3 datatype(size)....);
- Table_name in the above syntax is the name of the table we want to create.
- column_1, column_2, and column_3 define the entities of the Data in a database.
- Size in the above syntax tells us about the length of the particular variable.
Oracle Create Table Example
Create table stu(
Name Varchar(20),
Section_name Varchar(10),
Roll_no number(10),
Subject Varchar(10)
);
You will get table created message once command is executed successfully. Use desc stu to see the structure of the table.