=> Create Table
create table employee(no integer,name varchar2(15));
=>Crete Table with Primary key
create table employee(no int primary key,name varchar2(15));
=>Crete Table with different Data types
create table student(a int,b integer,c long,d float,e numeric(7,2),f number(7,2),g dec(7,2),h decimal(7,2),i varchar2(15),j date);
* desc student
Name Null? Type
----------------------------------------- --------
A NUMBER(38)
B NUMBER(38)
C LONG
D FLOAT(126)
E NUMBER(7,2)
F NUMBER(7,2)
G NUMBER(7,2)
H NUMBER(7,2)
I VARCHAR2(15)
J DATE
* insert row into student table
insert into student values(100000000000,20000000,300000000,111.5,15000.00,15000.00,15000.00,15000.00,'ram',TO_DATE('1988/10/28','yyyy/mm/dd'));
create table employee(no integer,name varchar2(15));
=>Crete Table with Primary key
create table employee(no int primary key,name varchar2(15));
=>Crete Table with different Data types
create table student(a int,b integer,c long,d float,e numeric(7,2),f number(7,2),g dec(7,2),h decimal(7,2),i varchar2(15),j date);
* desc student
Name Null? Type
----------------------------------------- --------
A NUMBER(38)
B NUMBER(38)
C LONG
D FLOAT(126)
E NUMBER(7,2)
F NUMBER(7,2)
G NUMBER(7,2)
H NUMBER(7,2)
I VARCHAR2(15)
J DATE
* insert row into student table
insert into student values(100000000000,20000000,300000000,111.5,15000.00,15000.00,15000.00,15000.00,'ram',TO_DATE('1988/10/28','yyyy/mm/dd'));
No comments:
Post a Comment