Documente Academic
Documente Profesional
Documente Cultură
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Table created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
SQL> select dept_name from Pdepartment
2
SQL> select dept_name from Pdepartment;
DEPT_NAME
----------
Biology
Comp.Sci
Elec.Eng.
Finance
History
Music
Physics
7 rows selected.
Table altered.
SQL> commit;
Commit complete.
ERROR at line 1:
ORA-00905: missing keyword
Table created.
1 row created.
1 row created.
SQL> commit;
Commit complete.
===================================================================================
===========================
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
ID NAME DEPT_NAME
---------- --------------- ----------
SALARY
--------------------------------------------------------------------------------
10101 Srinivasan Comp.Sci
65000
12121 Wu Finance
90000
1 row created.
ID NAME DEPT_NAME
---------- --------------- ----------
SALARY
--------------------------------------------------------------------------------
10101 Srinivasan Comp.Sci
65000
12121 Wu Finance
90000
1 row created.
SQL> insert into Pinstructor values(32343,'El Said','History',60000);
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
ID NAME DEPT_NAME
---------- --------------- ----------
SALARY
--------------------------------------------------------------------------------
10101 Srinivasan Comp.Sci
65000
12121 Wu Finance
90000
ID NAME DEPT_NAME
---------- --------------- ----------
SALARY
--------------------------------------------------------------------------------
22222 Einstein Physics
95000
ID NAME DEPT_NAME
---------- --------------- ----------
SALARY
--------------------------------------------------------------------------------
45565 Katz Comp.Sci
75000
ID NAME DEPT_NAME
---------- --------------- ----------
SALARY
--------------------------------------------------------------------------------
76766 Crick Biology
72000
11 rows selected.
SQL> commet;
SP2-0042: unknown command "commet" - rest of line ignored.
SQL> comite;
SP2-0042: unknown command "comite" - rest of line ignored.
SQL> commit;
Commit complete.
Table created.
SQL> drop table Pstudent;
Table dropped.
Table created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
SQL> insert into Pstudent values(76653,'Aoi','Elec.Eng',60);
insert into Pstudent values(76653,'Aoi','Elec.Eng',60)
*
ERROR at line 1:
ORA-02291: integrity constraint (TEIT34.SYS_C0031860) violated - parent key not
found
SQL> commit;
Commit complete.
DEPT_NAME
----------
Biology
Comp.Sci
Elec.Eng.
Finance
History
Music
Physics
7 rows selected.
1 row created.
1 row created.
1 row created.
1 row created.
SQL> commit;
Commit complete.
13 rows selected.
Table created.
1 row created.
1 row created.
ID
----------
12121
765343
1 row deleted.
SQL> commit;
Commit complete.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
AS_ID I_ID
----- ----------
128 45565
12345 10101
23121 76543
44553 22222
45678 22222
76543 45565
76653 98345
98765 98345
98988 76766
9 rows selected.
SQL> commit;
Commit complete.
Table created.
Table dropped.
Table created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
SQL> commit;
Commit complete.
=============================================================================
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Table created.
COURSE_ID
----------
BIO-101
BIO-301
BIO-399
CS-101
CS-190
CS-315
CS-319
CS-347
EE-181
FIN-201
HIS-351
COURSE_ID
----------
MU-199
PHY-101
13 rows selected.
Table dropped.
Table created.
Table dropped.
2
SQL> create table Pprereq(course_id char(8),prereq_id char(8),primary
key(course_id,prereq_id),forei
gn key(course_id)references Pcourse(course_id),foreign key(prereq_id)references
Pcourse(course_id));
Table created.
ERROR at line 1:
ORA-00907: missing right parenthesis
*
ERROR at line 1:
ORA-00902: invalid datatype
Table created.
1 row created.
1 row created.
1 row created.
SQL> insert into Ptime_slot values('B','M','9:00','9:50');
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
SQL> insert into Ptime_slot values('G','F','16:00','16:50');
1 row created.
1 row created.
Table created.
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
SQL> commit;
Commit complete.
===================================================================================
============
===================================================================================
============
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Aug 20 16:25:21 2019
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
NAME
---------------
Srinivasan
Wu
Mozart
Einstein
El Said
Gold
Katz
Califieri
Crick
Brandt
Kim
NAME
---------------
Singh
12 rows selected.
NAME
---------------
Einstein
Crick
El Said
Srinivasan
Gold
Brandt
Wu
Kim
Singh
Mozart
Katz
NAME
---------------
Califieri
12 rows selected.
DEPT_NAME
----------
Physics
Comp.Sci
Finance
Elec.Eng.
Biology
Music
History
7 rows selected.
DEPT_NAME
----------
Comp.Sci
Finance
Music
Physics
History
Physics
Comp.Sci
History
Biology
Comp.Sci
Elec.Eng.
DEPT_NAME
----------
Finance
12 rows selected.
ID DEPT_NAME
---------- ----------
10101 Comp.Sci
12121 Finance
15151 Music
22222 Physics
32343 History
33456 Physics
45565 Comp.Sci
58583 History
76766 Biology
83821 Comp.Sci
98345 Elec.Eng.
ID DEPT_NAME
---------- ----------
76543 Finance
12 rows selected.
100
----------
100
100
100
100
100
100
100
100
100
100
100
100
----------
100
12 rows selected.
SALARY
--------------------------------------------------------------------------------
65000
90000
40000
95000
60000
87000
75000
62000
72000
92000
80000
SALARY
--------------------------------------------------------------------------------
80000
12 rows selected.
NAME
---------------
Srinivasan
Katz
Brandt
ERROR at line 1:
ORA-02270: no matching unique or primary key for this column-list
Table altered.
SQL> commit;
Commit complete.
===================================================================================
========
===================================================================================
======