0% found this document useful (0 votes)
22 views3 pages

Dbms Program 4 Mdu

The document describes inserting values into the student table using SQL commands. It demonstrates simple inserts, inserts into specific columns, and selecting data from the table.

Uploaded by

Atul Malhotra
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views3 pages

Dbms Program 4 Mdu

The document describes inserting values into the student table using SQL commands. It demonstrates simple inserts, inserts into specific columns, and selecting data from the table.

Uploaded by

Atul Malhotra
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Database Management Systems Lab

PROGRAM NO. 4
Objective: - Use the student table Created in program 1 and Insert values into tables
as:
1. Simple insert command.
2. Inserting values into specific column

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Feb 23 15:59:20 2012


Copyright (c) 1982, 2005, Oracle. All rights reserved.
1. Simple insert command.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> DESC student_cse10409
Name
Null? Type
----------------------------------------- -------- ---------------------------ROLL_NO
NUMBER(5)
CLASS
CHAR(5)
FATHER_NAME
CHAR(15)
NAME
CHAR(10)
BATE_OF_BIRTH
DATE
PHONE_NO
NUMBER(10)
SQL> insert into student_cse10409
2 values(409,'CSE-B','A.K MALHOTRA,'ATUL','31-may-1992','7838717343');
1 row created.
SQL> insert into student_cse10409
2 values(416,'CSE-B','A.K MALHOTRA,'ATUL','31-may-1992','7838717347');
1 row created.
SQL> insert into student_cse10409
2 values(435,'CSE-B','PAPAJI','ROOPAK','31-may-1992','7838717343');
1 row created.
SQL> insert into student_cse10409
2 values(435,'CSE-B','PAPAJI','RISHABH','31-may-1992','7838717353');

SBIT/CSE/IV/DBMS/CSE-212-F

CSE/10/409

Database Management Systems Lab

1 row created.
SQL> insert into student_cse10409
2 values(409,'CSE-B','PAPAJI','ATUL','30-may-1992','7838717356');
1 row created.
SQL> insert into student_cse10409
2 values(412,'CSE-B','PAPAJI','DHEERAJ','30-jun-1992','7838715673');
1 row created.
SQL> select * from student_cse10409
2 ;
ROLL_NO CLASS FATHER_NAME NAME
DATE_OF_B PHONE_NO
---------- ----- --------------- ---------- --------- ---------------------------------------------409 CSE-B A.K MALHOTRA
ATUL
31-MAY-92 7838717343
416 CSE-B A.K MALHOTRA
ATUL
31-MAY-92 7838717347
435 CSE-B PAPAJI
ROOPAK 31-MAY-92 7838717343
435 CSE-B PAPAJI
RISHABH 31-MAY-92 7838717353
409 CSE-B PAPAJI
ATUL
30-MAY-92 7838717356
412 CSE-B PAPAJI
DHEERAJ 30-JUN-92 7838715673
6 rows selected.
SQL> commit;
Commit complete.
2. Inserting values into specific column
SQL> insert into student_cse10409
2 (roll_no) values(436);
1 row created.
SQL> insert into student_cse10409
2 (class) values('CSE_B');
1 row created.
SQL> insert into student_cse10409
2 (name) values('AYUSH');
1 row created.
SQL> commit;
Commit complete.

SBIT/CSE/IV/DBMS/CSE-212-F

CSE/10/409

Database Management Systems Lab

SQL> select * from student_cse10409;


ROLL_NO CLASS FATHER_NAME NAME
DATE_OF_B PHONE_NO
---------- ----- --------------- ---------- --------- ---------- ---------------------------------409 CSE-B A.K MALHOTRA
ATUL
31-MAY-92 7838717343
416 CSE-B A.K MALHOTRA
ATUL
31-MAY-92 7838717347
435 CSE-B PAPAJI
ROOPAK
31-MAY-92 7838717343
435 CSE-B PAPAJI
RISHABH
31-MAY-92 7838717353
409 CSE-B PAPAJI
ATUL
30-MAY-92 7838717356
412 CSE-B PAPAJI
DHEERAJ
30-JUN-92
7838715673
436
CSE_B
AYUSH
9 rows selected.
SQL>

SBIT/CSE/IV/DBMS/CSE-212-F

CSE/10/409

You might also like