#SQL Assignment3
#SQL Assignment3
#Kajal_Hardwaria
#19030141020
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.1.36-community-log MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> INSERT INTO Student VALUES ("s1" , "Stuti" , "Farukha Badi Bazar" ,
"Delhi");
Query OK, 1 row affected (0.11 sec)
mysql> INSERT INTO Student VALUES ("s4" , "Juhi" , "Ghanta Ghar" , "Pune");
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO Student VALUES ("s2" , "Puja" , "Lohat Bazar" , "Kanpur");
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO Student VALUES ("s3" , "Bharat" , "Ratan Lal Nagar" , "Pune");
Query OK, 1 row affected (0.02 sec)
1) What are the PIDs of the students whose name is Started from S?
2) Which pairs of students live at the same city with their professors.
4) What are the names and addresses of the students who are taking course “Java “?
5) What are the courses that the head of the CS department is teaching?
SOL :> There Is No Such Department column present in any of the table and i am not
going to add any column because then i have to deal with lots of problem in
inserting a data in the Table and i don't have that much of Time so i am selecting
the courses for each student
6) List the name and city of professors who teaches course “RDBMS”.
OR
7) Are there any students who are taking at least two courses taught by Professor
“Samrat”
8) Update the name of professor for course “JavaScript”. The new name is “ jayesh
”