The document outlines the creation of two tables, 'STUDENTS' and 'TEACHERS', specifying primary keys and data types. It includes various SQL queries for displaying student data, counting grades, retrieving specific information, modifying primary keys, updating marks and salaries, and deleting records. Additionally, it suggests adding custom values to the tables while ensuring certain data is included.
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 ratings0% found this document useful (0 votes)
3 views2 pages
SQL
The document outlines the creation of two tables, 'STUDENTS' and 'TEACHERS', specifying primary keys and data types. It includes various SQL queries for displaying student data, counting grades, retrieving specific information, modifying primary keys, updating marks and salaries, and deleting records. Additionally, it suggests adding custom values to the tables while ensuring certain data is included.
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/ 2
Create table “STUDENTS” and “TEACHERS”
Where ID and RNO are primary keys and int type (others are varchar and int u can see)
a)Display all the data of students based on their alphabetical
order(of their name) b)Display the number of people who got each grade (like 1 got A , 2 got B etc ) c)Display ID . student name , marks and teacher name from STUDENTS AND TEACHERS d)Change primary key from ID to SALARY in TEACHERS table e)Increase the marks of every student who scored less than 80 (one query only) f) Display the names of the teacher with the highest salary and lowest salary g)Delete the record of the student whose name starts with “D” h)Change the SUBJECT to MATH of the teacher whose name ends with “I” i) Increase the salary by 2x if salary is less than 14000