DBMS
DBMS
Management System
( Practicals )
Create Tables
Output :
Insert Dummy Data
Output :
1. Retrieve names of students
enrolled in any society.
STUDENTNAME
--------------------
Alice
Aaron
Bella
Arjun
Rahul
Sneha
Riya
Karan
Divya
Ankit
Mohit
STUDENTNAME
--------------------
Neha
Vivek
13 rows selected.
2. . Retrieve all society names.
SOCNAME
--------------------
Debating
Dancing
Sanskrit
Sports
Music
Drama
Painting
Literature
Debate
Silent
NSS
11 rows selected.
3. Retrieve students ‘ name
starting with the letter ‘ A’ .
STUDENTNAME
--------------------
Alice
Aaron
Bella
Arjun
Rahul
Sneha
Riya
Karan
Divya
Ankit
Mohit
STUDENTNAME
--------------------
Neha
12 rows selected.
14. Find the society in which
maximum students are enrolled .
15. Find the names of all
students who have enrolled in
any society and society names in
which at least one student has
enrolled .
NAME TYPE
-------------------- -------
Arjun Student
Rahul Student
Sneha Student
Riya Student
Karan Student
Divya Student
Ankit Student
Mohit Student
Neha Student
Alice Student
Bella Student
NAME TYPE
-------------------- -------
Aaron Student
Debating Society
Sanskrit Society
Sports Society
Music Society
NSS Society
Dancing Society
Drama Society
Painting Society
Literature Society
Debate Society
NAME TYPE
-------------------- -------
Silent Society
23 rows selected.
16 . Find the society names such
that its mentor has a name with
“ Gupta “ in it .
11 rows selected.
19 . Increment Total seats of
each society by 10% .
table .
21. Update date of enrolment of
society is “s1” to “2018-01-15
“ , “s2” to the current date and
“s3” to “2018-01-02”.
22. Create a view to keep track
of society names with the total
number of students enrolled in
it.
View created.
SOCNAME TOTALENROLLED
-------------------- -------------
Debating 7
Sanskrit 4
Sports 2
Music 2
NSS 2
Dancing 2
Drama 3
Painting 3
Literature 2
Debate 1
Silent 1
11 rows selected.
23. Find the student names
enrolled in all the societies.
11 rows selected.