DBMS 2
DBMS 2
DBMS 2
2.1 Query to display the Employee Name and Salary of all the employees earning more than
$2850.
Ans:
To query and display the Employee Name and Salary of all employees earning more than $2850, you would
typically use the following SQL query:
FROM Employees
2.2 Query to display Employee Name and Department Number for the Employee No= 7900.
Ans:
To query and display the Employee Name and Department Number for the employee with Employee_No =
7900, you would use the following SQL query:
In this query:
2.3 Query to display Employee Name and Salary for all employees whose salary is not in the
Ans:
To display the Employee Name and Salary for all employees whose salary is not in the range of $1500 and $2850,
you can use the following SQL query:
2.4 Query to display Employee Name and Department No. of all the employees in Dept 10 and
Ans:
To display the Employee Name and Department No. of all employees in Dept 10 and Dept 30, and to order the
result alphabetically by employee name, use the following SQL query:
FROM Employees
OUTPUT:
2.5 Query to display Name and Hire Date of every Employee who was hired in 1981.
Ans:
To display the Name and Hire Date of every employee who was hired in 1981, you can use the following SQL query:
FROM Employees
Explanation output:
FROM Employees
This version uses the BETWEEN clause to filter hire dates within the year 1981.