Вы находитесь на странице: 1из 8

Spool File For Oracle Students Trained by Mr.

Sathish Yellanki
.

--------------------------------------------------------------------------------
SkyEss Techno Solutions Pvt. Ltd.
Flat No. 201, II Floor, Abhilash Towers, BK Guda, Hyderabad 500 038
Ph No. +9140 23710047, 64640047, Mobile: 9985798869,WhatsApp:9985798869
Contact For Courses And Training in
Oracle Developer Suite 10g(D2K), Oracle Apps R12, Live Projects in SQL and PL/SQL, Data
Modeling, Linux/Unix
Follow Me: https://www.facebook.com/satishkumar.yellanki

Know you can register online for particular course (http://skyess.info/contact-form)


Spool File For Oracle Students Trained by Mr.Sathish Yellanki
.

--------------------------------------------------------------------------------
SkyEss Techno Solutions Pvt. Ltd.
Flat No. 201, II Floor, Abhilash Towers, BK Guda, Hyderabad 500 038
Ph No. +9140 23710047, 64640047, Mobile: 9985798869,WhatsApp:9985798869
Contact For Courses And Training in
Oracle Developer Suite 10g(D2K), Oracle Apps R12, Live Projects in SQL and PL/SQL, Data
Modeling, Linux/Unix
Follow Me: https://www.facebook.com/satishkumar.yellanki

Know you can register online for particular course (http://skyess.info/contact-form)


Spool File For Oracle Students Trained by Mr.Sathish Yellanki
.

SQL> cl scr

SQL> CREATE OR REPLACE TYPE Student --USER Defined Object Data Type
2 AS
3 OBJECT
4 (
5 Studid NUMBER(6)
6 ,Sname VARCHAR2(20)
7 ,DOB DATE
8 ,DOA DATE
9 ,FEES NUMBER(7, 2)
10 );
11 /

Type created.

SQL> DESC Student


Name Null?
Type
----------------------------------------------------------------- ------
-- --------------------------------------------
STUDID
NUMBER(6)
SNAME
VARCHAR2(20)
DOB
DATE
DOA
DATE
FEES
NUMBER(7,2)

SQL> INSERT INTO Student


2 VALUES(1234, 'SAMPLE', '10-DEC-86', SYSDATE, 25000);
INSERT INTO Student
*
ERROR at line 1:
ORA-04044: procedure, function, package, or type is not allowed here

SQL> CREATE TABLE McaStudent --OBJECT Table


2 OF Student;CREATE TABLE McaStudent --OBJECT Table
3 OF Student
4
--------------------------------------------------------------------------------
SkyEss Techno Solutions Pvt. Ltd.
Flat No. 201, II Floor, Abhilash Towers, BK Guda, Hyderabad 500 038
Ph No. +9140 23710047, 64640047, Mobile: 9985798869,WhatsApp:9985798869
Contact For Courses And Training in
Oracle Developer Suite 10g(D2K), Oracle Apps R12, Live Projects in SQL and PL/SQL, Data
Modeling, Linux/Unix
Follow Me: https://www.facebook.com/satishkumar.yellanki

Know you can register online for particular course (http://skyess.info/contact-form)


Spool File For Oracle Students Trained by Mr.Sathish Yellanki
.
SQL> CREATE TABLE McaStudent --OBJECT Table
2 OF Student;

Table created.

SQL> DESC McaStudent


Name Null?
Type
----------------------------------------------------------------- ------
-- --------------------------------------------
STUDID
NUMBER(6)
SNAME
VARCHAR2(20)
DOB
DATE
DOA
DATE
FEES
NUMBER(7,2)

SQL> INSERT INTO McaStudent


2 VALUES(1234, 'KUMAR', '07-OCT-98', SYSDATE, 15000);

1 row created.

SQL> INSERT INTO McaStudent(StudID, SName)


2 VALUES(1235, 'KRISHNA');INSERT INTO McaStudent(StudID, SName)
3 VALUES(1235, 'KRISHNA')
4
SQL> INSERT INTO McaStudent(StudID, SName)
2 VALUES(1235, 'KRISHNA');

1 row created.

SQL> SELECT *
2 FROM McaStudent;

STUDID SNAME DOB DOA FEES


---------- -------------------- --------- --------- ----------
1234 KUMAR 07-OCT-98 01-OCT-15 15000
1235 KRISHNA

SQL> SELECT StudID, Sname


2 FROM McaStudent;

--------------------------------------------------------------------------------
SkyEss Techno Solutions Pvt. Ltd.
Flat No. 201, II Floor, Abhilash Towers, BK Guda, Hyderabad 500 038
Ph No. +9140 23710047, 64640047, Mobile: 9985798869,WhatsApp:9985798869
Contact For Courses And Training in
Oracle Developer Suite 10g(D2K), Oracle Apps R12, Live Projects in SQL and PL/SQL, Data
Modeling, Linux/Unix
Follow Me: https://www.facebook.com/satishkumar.yellanki

Know you can register online for particular course (http://skyess.info/contact-form)


Spool File For Oracle Students Trained by Mr.Sathish Yellanki
.
STUDID SNAME
---------- --------------------
1234 KUMAR
1235 KRISHNA

SQL> SELECT StudID, Sname


2 FROM McaStudent
3 WHERE StudID = 1234;

STUDID SNAME
---------- --------------------
1234 KUMAR

SQL> UPDATE McaStudent


2 SET Sname = 'SRI RAM'
3 WHERE StudID = 1234;

1 row updated.

SQL> SELECT StudID, Sname


2 FROM McaStudent
3 WHERE StudID = 1234;

STUDID SNAME
---------- --------------------
1234 SRI RAM

SQL> DELETE FROM McaStudent


2 WHERE StudID = 1234;

1 row deleted.

SQL> INSERT INTO McaStudent


2 VALUES
3 (
4 Student --Default Constructor Provided By Oracle Upon The Student
Type
5 (
6 1236,
7 'SATHISH',
8 '05-SEP-99',
9 SYSDATE,
10 1300
11 )
12 );

--------------------------------------------------------------------------------
SkyEss Techno Solutions Pvt. Ltd.
Flat No. 201, II Floor, Abhilash Towers, BK Guda, Hyderabad 500 038
Ph No. +9140 23710047, 64640047, Mobile: 9985798869,WhatsApp:9985798869
Contact For Courses And Training in
Oracle Developer Suite 10g(D2K), Oracle Apps R12, Live Projects in SQL and PL/SQL, Data
Modeling, Linux/Unix
Follow Me: https://www.facebook.com/satishkumar.yellanki

Know you can register online for particular course (http://skyess.info/contact-form)


Spool File For Oracle Students Trained by Mr.Sathish Yellanki
.
1 row created.

SQL> SELECT * FROM McaStudent;

STUDID SNAME DOB DOA FEES


---------- -------------------- --------- --------- ----------
1235 KRISHNA
1236 SATHISH 05-SEP-99 01-OCT-15 1300

SQL> SPOOL OFF

--------------------------------------------------------------------------------
SkyEss Techno Solutions Pvt. Ltd.
Flat No. 201, II Floor, Abhilash Towers, BK Guda, Hyderabad 500 038
Ph No. +9140 23710047, 64640047, Mobile: 9985798869,WhatsApp:9985798869
Contact For Courses And Training in
Oracle Developer Suite 10g(D2K), Oracle Apps R12, Live Projects in SQL and PL/SQL, Data
Modeling, Linux/Unix
Follow Me: https://www.facebook.com/satishkumar.yellanki

Know you can register online for particular course (http://skyess.info/contact-form)


Spool File For Oracle Students Trained by Mr.Sathish Yellanki
.

--------------------------------------------------------------------------------
SkyEss Techno Solutions Pvt. Ltd.
Flat No. 201, II Floor, Abhilash Towers, BK Guda, Hyderabad 500 038
Ph No. +9140 23710047, 64640047, Mobile: 9985798869,WhatsApp:9985798869
Contact For Courses And Training in
Oracle Developer Suite 10g(D2K), Oracle Apps R12, Live Projects in SQL and PL/SQL, Data
Modeling, Linux/Unix
Follow Me: https://www.facebook.com/satishkumar.yellanki

Know you can register online for particular course (http://skyess.info/contact-form)


Spool File For Oracle Students Trained by Mr.Sathish Yellanki
.

--------------------------------------------------------------------------------
SkyEss Techno Solutions Pvt. Ltd.
Flat No. 201, II Floor, Abhilash Towers, BK Guda, Hyderabad 500 038
Ph No. +9140 23710047, 64640047, Mobile: 9985798869,WhatsApp:9985798869
Contact For Courses And Training in
Oracle Developer Suite 10g(D2K), Oracle Apps R12, Live Projects in SQL and PL/SQL, Data
Modeling, Linux/Unix
Follow Me: https://www.facebook.com/satishkumar.yellanki

Know you can register online for particular course (http://skyess.info/contact-form)

Вам также может понравиться