You are on page 1of 4

SQL> select * from dual;

D
-
X
SQL> select sysdate from dual
2
SQL> select sysdate from dual;
SYSDATE
---------
04-FEB-11
SQL> select sysdate
2 from dual;
SYSDATE
---------
04-FEB-11
SQL> create table customer(
2 cust_id varchar2(3) primary key,
3 Fname varchar2(15),
4 Lname varchar2(15),
5 Area varchar2(2)
6 Phone_no Number(8));
create table customer(
*
ERROR at line 1:
ORA-00922: missing or invalid option

SQL> create table customer


2 ( cust_id varchar2(3)
3
SQL> create table customer
2 ( cust_id varchar2(3),
3 Fname varchar2(15),
4 Lname varchar2(15),
5 Area varchar2(2),
6 Phone_no Number(8));
create table customer
*
ERROR at line 1:
ORA-00955: name is already used by an existing object

SQL> create table customer9


2 ( cust_id varchar2(3),
3 Fname varchar2(15),
4 Lname varchar2(15),
5 Area varchar2(2),
6 Phone_no Number(8));
Table created.
SQL> desc customer9;
Name Null? Type
----------------------------------------- -------- ----------------------------
CUST_ID VARCHAR2(3)
FNAME VARCHAR2(15)
LNAME VARCHAR2(15)
AREA VARCHAR2(2)
PHONE_NO NUMBER(8)
SQL> create table mov9
2 (Mov_no Number(2)
3
SQL> create table mov9
2 ( Mov_no Number(2),
3 title varchar2(15),
4 type varchar2(10),
5 star varchar2(25),
6 price Number(8,2));
Table created.
SQL> create table inv9
2 (inv_no varchar2(3),
3 mov_no Number(2),
4 cust_id varchar2(3),
5 i_date Date,
6 R_date Date);
Table created.
SQL> insert into customer9 values('a1','border','allan','sa',723622);
1 row created.
SQL> insert into customer values('a2','shields','tina','mo',123784);
insert into customer values('a2','shields','tina','mo',123784)
*
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected SCOTT.ADDRESS got NUMBER

SQL> insert into customer9 values('a2','shields','tina','mo',123784);


1 row created.
SQL> insert into customer9 values('a3','kumar','ravi','bi',545621);
1 row created.
SQL> insert into customer9 values('a4','rai','sunita','ch',983724);
1 row created.
SQL> insert into customer9 values('a5','','sachin','dr',253489);
1 row created.
SQL> insert into customer9 values('a6',smith','james','wa',634672);
ERROR:
ORA-01756: quoted string not properly terminated

SQL> insert into customer9 values('a6','smith','james','wa',634672);


1 row created.
SQL> insert into mov9 values(1,'carry on doctor','comedy','leslie pholips',175);
1 row created.
SQL> insert into mov9 values(2,'the firm','Thriller','tom cruise',200);
1 row created.
SQL> insert into mov9 values(3,'pretty woman','Romance','richard gere',150.55);
1 row created.
SQL> insert into mov9 values(4,'home alone','comedy','macaulay culkin',150);
1 row created.
SQL> insert into mov9 values(5,'The fugitive','thriller','harison ford',200);
1 row created.
SQL> insert into mov9 values(6,'coma','suspense','michael dougles',100);
1 row created.
SQL> insert into mov9 values(7,'Dracula','horror','gary oldman',150.25);
1 row created.
SQL> insert into mov9 values(8,'Quick change','comedy','bill murray',190);
1 row created.
SQL> insert into inv9 values(101,4,'a1','23-jul-95','28-jul-95');
1 row created.
SQL> insert into inv9 values(102,3,'a2','12-aug-95','15-aug-95');
1 row created.
SQL> insert into inv9 values(103,1,'a3','10-sep-95','16-sep-95');
1 row created.
SQL> insert into inv9 values(104,6,'a4','23-jul-95','24-jul-95');
1 row created.
SQL> insert into inv9 values(105,7,'a4','28-jul-95','29-jul-95');
1 row created.
SQL> insert into inv9 values(106,2,'a6','1-sep-95','4-sep-95);
ERROR:
ORA-01756: quoted string not properly terminated
SQL> insert into inv9 values(106,2,'a6','1-sep-95','4-sep-95');
1 row created.
SQL> insert into inv9 values(107,9,'a5','7-aug-95','8-aug-95');
1 row created.
SQL> insert into inv9 values(108,9,'a1','18-aug-95','22-sep-95');
1 row created.
SQL> insert into inv9 values(109,5,'a3','6-jul-95','9-jul-95');
1 row created.
SQL> insert into inv9 values(110,8,'a6','2-aug-95','5-aug-95');
1 row created.
SQL> select * from customer9 table;
select * from customer9 table
*
ERROR at line 1:
ORA-00933: SQL command not properly ended

SQL> select * from customer9


2
SQL>
SQL> select * from customer9;
select * from customer9
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel

SQL> select * from customer9;


select * from customer9
*
ERROR at line 1:
ORA-03114: not connected to ORACLE

SQL> select * from customer9;


select * from customer9
*
ERROR at line 1:
ORA-03114: not connected to ORACLE

SQL> desc mov9;


ERROR:
ORA-03114: not connected to ORACLE

SQL>

You might also like