Assignment
Assignment
Q1 Write q query to find all the employees whose salary is between 50000
to 100000.
SELECT * FROM Employee
WHERE Salary BETWEEN '50000'
AND '100000';
Q2 Write a query to find the names of employees that begin with ‘S.
SELECT * FROM Employee
WHERE EmpFname LIKE 'S%';
Q3 Write a query to fetch all the records from the EmployeeInfo table
ordered
by EmpLname in descending order and Department in the ascending
order
Q10 Display those rows from the table Students where the value of the field
ROLL_NO is either 20 or 21 or 23.
SELECT * FROM Students WHERE ROLL_NO IN (20,21,23);
Q11 Create a table called "Persons" that contains five columns: PersonID,
LastName, FirstName, Address, and City.
CREATE TABLE Persons (
PersonID int,
LastName varchar(25),
FirstName varchar(25),
Address varchar(25),
City varchar(25)
);
Q12 To select the first name of all the
Employees the query would be like:
SELECT first_name FROM
Employee;
Q13 To List all customers from table employee
SELECT *
FROM Employee;
Q14 Delete all products with unit price higher than rs 50.
DELETE FROM employee
WHERE UnitPrice > 50;
Q15 Update the city to mumbai for supplier britannia ,Ltd.
UPDATE Supplier
SET City = 'mumbai'
WHERE Name = 'britannia, Ltd.'