SQL Queries
SQL Queries
SQL Queries
311119205051
Activity 3
SQL Queries
Q2: Add a column experience to the emp table numeric null is allowed.
Q3: Modify the column width of the job field of emp table.
Q11: List the records in the emp table orderby salary in ascending order.
Q12: List the records in the emp table orderby salary in descending order.
Q14: Display all the details of the records whose employee name starts with “A”
Q15: Display all the details of the records whose employee name does not starts with “A”
SHERIN SNEHA J
311119205051
Q16: Display the rows whose salary ranges from 30000 to 45000.
Q17: Calculate the total and average salary amount of the emp table.
Q19: Determine the max and min salary and rename the column as max_salary and min_salary.
Q20: Find how many job titles are available in employee table
Q22: Add a default constraint to the salary and the set the default value as Rs.5000
Q23: Find the total amount of salary spent by each department using GROUP BY clause
Q24: Display the department that has total salary paid for its employees more than
25000
Q26: Add a Column Phone number to the Employee table and also allow it to add only
unique values as the Phone number.
Q27: Display all employee names and salary whose salary is greater than minimum
salary of the company and job title starts with ‗A.
Q28: Issue a query to find all the employees who work in the same job as SheSha.
Q29: Display the employee details, departments that the departments are same in both the
emp and dept.
SHERIN SNEHA J
311119205051
Q30: Display the employee details, departments that the departments are not same in
both the emp and dept.