SQL1
SQL1
To create a new table, you use the CREATE TABLE statement. The following illustrates the basic
syntax of the CREATE TABLE statement:
CREATE TABLE [IF NOT EXISTS] table_name (
column1 datatype(length) column_contraint,
column2 datatype(length) column_contraint,
column3 datatype(length) column_contraint,
table_constraints
);
CREATE:
(a)CREATE TABLE: This is used to create a new relation (table) Syntax:
CREATE TABLE (field_1 data_type(size),field_2 data_type(size), .. . );
SQL> CREATE TABLE Student (sno NUMBER (3), sname CHAR (10), class
CHAR (5));
INSERT
• INSERT INTO: This is used to add records into a relation. These are
three type of INSERT INTO queries which are as