Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
DBMS Practical File

DBMS Practical File

Ratings:
(0)
|Views: 158|Likes:
Published by Aayush Wadhwa

More info:

Published by: Aayush Wadhwa on May 07, 2012
Copyright:Attribution Non-commercial

Availability:

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

05/07/2012

pdf

text

original

 
PROGRAM : 1
Aim : To create a new user account
SQL> -- TO CREATE A NEW USER ACCOUNTSQL>CONNECT SCOTT/TIGERConnected.SQL> CREATE USER PUNEET IDENTIFIED BY RAJ;User created.SQL> GRANT CONNECT, RESOURCE TO PUNEET;Grant succeeded.SQL> CONNECT PUNEET/RAJConnected.SQL>CONNECT SYSTEM/MANAGERConnected.SQL> ALTER USER PUNEET IDENTIFIED BY SANJAY;User altered.SQL> CONNECT PUNEET/SANJAYConnected.
1
 
PROGRAM : 2
AIM: TO CREATE, INSERT, DISPLAY, DELETE, UPDATE,DROP A GIVEN TABLE
SQL> -- TO CREATE, INSERT, DISPLAY, DELETE, UPDATE ,DROP A GIVEN TABLESQL> CONNECT MANVEE/MANUConnected.SQL> CREATE TABLE FRIENDS(SERIAL NUMBER(3),NAME VARCHAR2(20), AGENUMBER(2), INCOME NUMBER(6));Table created.SQL> DESC FRIENDS;Name Null? Type---------------------SERIAL NUMBER(3)NAME VARCHAR2(20)AGE NUMBER(2)INCOME NUMBER(6)SQL> INSERT INTO FRIENDS VALUES(1,'PUNEET',19,20000);1 row created.SQL> INSERT INTO FRIENDS VALUES(2,'RICHA' ,20,12000);1 row created.SQL> INSERT INTO FRIENDS VALUES(3,'GAURAV',21,17000);1 row created.SQL> INSERT INTO FRIENDS VALUES(4,'ANKUSH',23,20000);1 row created.SQL> INSERT INTO FRIENDS VALUES(5,'PRINCE',19,30000);1 row created.SQL> SELECT * FROM FRIENDS;SERIAL NAMEAGEINCOME--------- --------------------
2
 
1 PUNEET 19 120002 RICHA 20 120003 GAURAV 21 170004 ANKUSH 23 200005 PRINCE 19 30000SQL> INSERT INTO FRIENDS(SERIAL,AGE,INCOME)VALUES(6,23,23000);1 row created.SQL> INSERT INTO FRIENDS(SERIAL,AGE,INCOME)VALUES(7,24,24000);1 row created.SQL> INSERT INTO FRIENDS(SERIAL,AGE,INCOME)VALUES(8,25,25000);1 row created.SQL> INSERT INTO FRIENDS(SERIAL,AGE,INCOME)VALUES(9,26,26000);1 row created.SQL> INSERT INTO FRIENDS(SERIAL,AGE,INCOME)VALUES(10,27,27000);1 row created.SQL> SELECT * FROM FRIENDS;SERIAL NAME AGE INCOME------------- ------------ -------------- ----------------------1 PUNEET 19 200002 RICHA 20 120003 GAURAV 21 170004 ANKUSH 23 200005 PRINCE 19 300006 23 230007 24 240008 25 250009 26 2600010 27 27000 10 rows selected.SQL> INSERT INTO FRIENDS VALUES(&SERIAL,'&NAME',&AGE,&INCOME);Enter value for serial: 11
3

You're Reading a Free Preview

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