Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
0Activity
0 of .
Results for:
No results containing your search query
P. 1
Untitled

Untitled

Ratings: (0)|Views: 0 |Likes:
Published by somenath_singh

More info:

Published by: somenath_singh on Oct 08, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less

10/08/2011

pdf

text

original

 
SQL> CREATE TABLE EMP2 (3 ECODE VARCHAR2(8),4 NAME VARCHAR2(19),5 SAL NUMBER(6)6 );Table created.SQL> INSERT INTO EMP2 VALUES('&ECODE','&ENAME',&SAL);Enter value for ecode: EOO1Enter value for ename: SOMENATHEnter value for sal: 8500old 2: VALUES('&ECODE','&ENAME',&SAL)new 2: VALUES('EOO1','SOMENATH',8500)1 row created.SQL> /Enter value for ecode: EOO2Enter value for ename: JOYDIP DASEnter value for sal: 7852old 2: VALUES('&ECODE','&ENAME',&SAL)new 2: VALUES('EOO2','JOYDIP DAS',7852)1 row created.SQL> DROP TABLE EMP;Table dropped.SQL> SELECT TNAME FROM TAB;TNAME------------------------------BONUSDEPTEMPLOYEEPHONESALGRADESQL> DESC EMPLOYEE;Name Null? Type----------------------------------------- -------- ---------------------------ECODE NOT NULL VARCHAR2(8)ENAME VARCHAR2(20)CITY VARCHAR2(30)SAL NUMBER(6,2)SQL> SELECT * FROM EMPLOYEE;ECODE ENAME CITY SAL-------- -------------------- ------------------------------ ----------EOO1 SOMENATH SINGH DELHI 3800EOO2 BIKRAM SINGH MUMBAI 6500EOO3 JOYDIP DAS CHANNAI 5400EOO4 RAJKUMAR PAL KOLKATA 6520EOO5 DEBASIS ROUTH DELHI 6535EOO6 MONOJ PAL KOLKATA 4520
 
6 rows selected.SQL> EXITSQL> CREATE TABLE PRODUCT2 (3 P_ID VARCHAR2(8) NOT NULL PRIMARY KEY,4 PNAME VARCHAR2(5),5 QUAN NUMBER(6)6 );Table created.SQL> CREATE TABLE PURCHASE2 (3 P_ID VARCHAR2(8) REFERENCES PRODUCT(P_ID) ON DELETE CASCADE,4 PRICE NUMBER(6,2)5 );Table created.SQL> CREATE TABLE EMP2 (3 ECODE VARCHAR2(6) NOT NULL PRIMARY KEY,4 ENAME VARCHAR2(15) NOT NULL,5 GRADE VARCHAR2(1) DEFAULT 'A',6 SEX VARCHAR2(1) CHECK(SEX IN('M','F')),7 SAL NUMBER(6,2) CHECK(SAL BETWEEN 2500 AND 9000)8 );Table created.SQL> CREATE TABLE EMPLOYEE2 (3 ECODE VARCHAR2(8) PRIMARY KEY NOT NULL,4 ENAME VARCHAR2(20),5 CITY VARCHAR2(30),6 SAL NUMBER(6,2)7 );Table created.SQL> INSERT INTO EMPLOYEE2 VALUES('&ECODE','&ENAME','&CITY',&SAL);Enter value for ecode: EOO1Enter value for ename: SOMENATH SINGH
 
Enter value for city: DELHIEnter value for sal: 3800old 2: VALUES('&ECODE','&ENAME','&CITY',&SAL)new 2: VALUES('EOO1','SOMENATH SINGH','DELHI',3800)1 row created.SQL> /Enter value for ecode: EOO2Enter value for ename: BIKRAM SINGHEnter value for city: MUMBAIEnter value for sal: 6500old 2: VALUES('&ECODE','&ENAME','&CITY',&SAL)new 2: VALUES('EOO2','BIKRAM SINGH','MUMBAI',6500)1 row created.SQL> /Enter value for ecode: EOO3Enter value for ename: JOYDIP DASEnter value for city: CHANNAIEnter value for sal: 5400old 2: VALUES('&ECODE','&ENAME','&CITY',&SAL)new 2: VALUES('EOO3','JOYDIP DAS','CHANNAI',5400)1 row created.SQL> /Enter value for ecode: EOO4Enter value for ename: RAJKUMAR PALEnter value for city: KOLKATAEnter value for sal: 6520old 2: VALUES('&ECODE','&ENAME','&CITY',&SAL)new 2: VALUES('EOO4','RAJKUMAR PAL','KOLKATA',6520)1 row created.SQL> /Enter value for ecode: EOO5Enter value for ename: DEBASIS ROUTHEnter value for city: DELHIEnter value for sal: 6535old 2: VALUES('&ECODE','&ENAME','&CITY',&SAL)new 2: VALUES('EOO5','DEBASIS ROUTH','DELHI',6535)1 row created.SQL> /Enter value for ecode: EOO6Enter value for ename: MONOJ PALEnter value for city: KOLKATAEnter value for sal: 4520old 2: VALUES('&ECODE','&ENAME','&CITY',&SAL)new 2: VALUES('EOO6','MONOJ PAL','KOLKATA',4520)

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->