0% found this document useful (0 votes)
24 views2 pages

Rdbms Prac QP

The document outlines several SQL queries to implement on different tables. It includes queries to: 1. Create supplier and employee tables with various fields 2. Query the supplier table to return suppliers by name, item, price or city criteria 3. Query the employee table to return employee details by designation, salary, name or date criteria 4. Perform operations like adding/deleting columns, updating prices, and creating views on the tables

Uploaded by

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

Rdbms Prac QP

The document outlines several SQL queries to implement on different tables. It includes queries to: 1. Create supplier and employee tables with various fields 2. Query the supplier table to return suppliers by name, item, price or city criteria 3. Query the employee table to return employee details by designation, salary, name or date criteria 4. Perform operations like adding/deleting columns, updating prices, and creating views on the tables

Uploaded by

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

Implement all the Questions

 Create a Supplier table with the fields as Sup_No (Primary Key), Sup_Name, Item_Supplied, Item_Price and City.
 Write sql query to display Supplier numbers and Supplier names whose name starts with ‘R’
 Write sql query to display the name of suppliers who supply Printers and whose city is Delhi.
 Write sql query to display the names of suppliers who supply the same items as supplied by Ramesh.

 Create a Supplier table with the fields as Sup_No (Primary Key), Sup_Name, Item_Supplied, Item_Price and City.
 Write sql query to increase the price of Keyboard by 200.
 Write sql query to display supplier numbers, Supplier names and item_price for suppliers in delhi in the ascending
order of item_price.
 Write sql query to add a new column called CONTACT_NO
Implement all the Questions
 Create a Supplier table with the fields as Sup_No (Primary Key), Sup_Name, Item_Supplied, Item_Price and City.
 Write sql query to delete the record whose itemprice is the lowest of all the items supplied.
 Create a view on the table which displays only supplier numbers and supplier names.
 Write sql query to display the records in the descending order of itemprice for each itemsupplied.
Implement all the Questions

 Create a Supplier table with the fields as Sup_No (Primary Key), Sup_Name, Item_Supplied, Item_Price and City.
 Write sql query to display the records of suppliers who supply items other than Processor or Keyboard.
 Write sql query to add a new column called CONTACTNO
 Write sql query to display Suplier numbers and Supplier names whose name starts with ‘S’

Implement all the Questions


 Create the table called EmpDetails with the below mentioned details.
Eid (Primary Key), Ename ,DOB, Designation, Salary and DOJ
 Write sql query to display all the employees whose designation is Programmer.
 Write sql query to display employees who have joined after 2014.
 Write sql query to display all the employees whose name ends with ‘a’.
Implement all the Questions
 Create the table called EmpDetails with the below mentioned details.
Eid (Primary Key), Ename ,DOB, Designation, Salary and DOJ
 Write sql query to display the total salary of all the employees whose designation is programmer.
 Write sql query to display all the employee names in upper case.
 Write sql query to display the details of the employee with highest experience.
Implement all the Questions
 Create the table called EmpDetails with the below mentioned details.
Eid (Primary Key), Ename ,DOB, Designation, Salary and DOJ
 Write sql query to display the details of the employees whose name contains ‘ee’.
 Write sql query to increase the salaries of employees by 5000 whose designation is DBA.
 Write sql query to display the employees whose salary is more than the average salary of all the employees.
Implement all the Questions
 Create the table called EmpDetails with the below mentioned details.
Eid (Primary Key), Ename ,DOB, Designation, Salary and DOJ
 Write sql query to display all the employees whose designation is Programmer.
 Write sql query to display the total salary of all the employees whose designation is programmer.
 Write sql query to display the employees whose salary is more than the average salary of all the employees.
Implement all the Questions
(1) Create the two tables as shown below with the given constraints:
Table name: Employee
Constraints:
Eid is Primary key and DeptId is foreign key
Salary should not be less than 10000
Columns:
Eid (Primary Key),Ename , DeptId (Foreign Key) , Designation , Salary ( > Rs 10000), DOJ
Tablename: Department
Constraints:
DeptId Primary key
Dname is NOT NULL
columns :
DeptId (Primary Key) , Dname

2.Write sql query to display all the employees who earn more than average salary of all the employees in the
company.
3.Write sql query to display the fields Eid, Ename and Dname.
Implement all the Questions
 Create the table called Student with the below mentioned details.
Sid (Primary Key) , Sname ,DOB , State , Gender, Category(ex. OBC,General,Sports, Ex Service men) , Degree_name
 Write sql query to display the students who are not from Telangana or AndhraPradesh.
 Create a view to display the columns Sid, Sname for students belonging to Telangana.
Implement all the Questions
 Create the table called Student with the below mentioned details.
Sid (Primary Key) , Sname ,DOB , State , Gender, Category(ex. OBC,General,Sports, Ex Service men) , Degree_name
 Write sql query to create an index on column Sname.
 Write sql query to display all the female students enrolled under B.Sc. CS and who belong to OBC.

You might also like