How to create a table in SQL
In this tutorial, we will learn how to create a table in SQL. For creating a new oracle table we will use CREATE TABLE statement in the oracle database. It must be noted that we should have privilege to CREATE TABLE in sql schema. Also the sql table should have quota for table space.
SYNTAX for CREATE TABLE
CREATE TABLE schema_name.table_name ( column_1 data_type column_constraint, column_2 data_type column_constraint, ... ... );
In the above SQL code we can see
- CREATE TABLE : It is the main clause under which other information is put.
- schema_name.table_name : We will mention schema name and then table name which we wanted to create. There are some