0% found this document useful (0 votes)
18 views

DBMS Lab 1

The document outlines steps for a lab assignment involving creating a database and table, inserting sample data, performing queries and modifications. It includes creating a STUDENT table with Rollno, Name, Address columns and inserting 10 records, followed by select, update, alter and delete operations on the table and data.

Uploaded by

Arpoxon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

DBMS Lab 1

The document outlines steps for a lab assignment involving creating a database and table, inserting sample data, performing queries and modifications. It includes creating a STUDENT table with Rollno, Name, Address columns and inserting 10 records, followed by select, update, alter and delete operations on the table and data.

Uploaded by

Arpoxon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Lab Assignment No.

1
(Using Single Table)
• Open database.
• List all available databases.
• Create your own database.
• Create a table STUDENT with following information:
▪ Name of table: STUDENT
▪ Columns and data types:
❖ Rollno integer
❖ Name varchar(20)
❖ Address varchar(20)
1. Inserting any 10 records to the student table
{(1, ‘Anil’, ‘KTM’), (2, ‘Madhu’, ‘Lalitpur’), (3, ‘Dhiraj’, ‘palpa’), (4, ‘Binod’,
‘KTM’), (5, ‘Suman’, ‘Bhaktapur’), (6, ‘Bishal’, ‘Palpa’), (7, ‘Jenisha’,
‘Lalitpur’), (8, ‘Sanju’, ‘Damak’), (9, ‘Santosh’, ‘Itahari’), (10, ‘Puja’,
‘Dharan’)}
2. Display all records of student relation.
3. Display rollno and name of students.
4. Display only those students whose address is “KTM”.
5. Modify address of those students whose rollno is 3 to “Kanchanpur”
6. Altering table by adding new column class varchar (20).
7. Drop column address.
8. Delete those students whose rollno greater than 5.
9. Alter table by changing the data type of name to varchar(15).
10.Delete all the data from student table.
11.Delete (DROP) the table.

You might also like