exp1 - NAME VARCHAR2(50) MARKS NUMBER(38) SQL> insert...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Aim : To study DDL commands in SQL RISHI AGARWAL ROLL NO 02 SE CMPN A SQL> create table rishi(roll_no integer,name varchar(25)); Table created. SQL> desc rishi; Name Null? Type ----------------------------------------- -------- ------------------ ROLL_NO NUMBER(38) NAME VARCHAR2(25) SQL> alter table rishi add(marks integer); Table altered. SQL> desc rishi; Name Null? Type ----------------------------------------- -------- ------------------ ROLL_NO NUMBER(38) NAME VARCHAR2(25) MARKS NUMBER(38) SQL> alter table rishi modify(name varchar(50)); Table altered. SQL> desc rishi; Name Null? Type ----------------------------------------- -------- ------------------ ROLL_NO NUMBER(38)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: NAME VARCHAR2(50) MARKS NUMBER(38) SQL> insert into rishi values(4,'Rishi',527); 1 row created. SQL> insert into rishi values(3,'Dragon',521); 1 row created. SQL> select * from rishi; ROLL_NO NAME MARKS---------- -------------------------------------------------- --------4 Rishi 527 3 Dragon 521 SQL> truncate table rishi; Table truncated. SQL> select * from rishi; no rows selected SQL> desc rishi; Name Null? Type----------------------------------------- -------- ------------------ROLL_NO NUMBER(38) NAME VARCHAR2(50) MARKS NUMBER(38) SQL> drop table rishi; Table dropped. SQL> desc rishi; ERROR: ORA-04043: object rishi does not exist...
View Full Document

This note was uploaded on 10/25/2010 for the course CMPN SEM4 taught by Professor Thakur during the Spring '07 term at University of Mumbai.

Page1 / 2

exp1 - NAME VARCHAR2(50) MARKS NUMBER(38) SQL> insert...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online