Sunday, April 1, 2018

Create Table

Syntax

Sql>Create Table (Table Name)
(, ,….);

Note

The character ‘;’ is the terminator for SQL statement.

Example

Sql>Create Table Emp_det(
       Empno Number(4), Ename Varchar2(15),
       Job Varchar(15), Mgr Number(4),
       Hiredate Timestamp, Sal Number(6,2),
       Comm Number(6,2), Ephoto BLOB,
       Deptno Number(2)
       );

Sql>Create Table Student_Det(
        StudNo Number(4), Fname Varchar(15),
        Lname Varchar2(15), DOB Date,
        DOJ Date, Fees Number(6,2),
        Gender Char
        );

No comments: