Question: 1. Write a query to display the names (first_name, last_name) from the Employee table 2. Write a query to get unique department ID from employee
1. Write a query to display the names (first_name, last_name) from the Employee table
2. Write a query to get unique department ID from employee table. You will need to use the DISTINCT as part of your query
3. Use ORDER BY to write a query to get the employee ID, name (first_name, last_name), salary in ascending order of salary.
4. Write a SQL statement to create a simple table countries including columns country_id,country_name and region_id.
5. Use IF NOT EXISTS to write a SQL statement to create a simple table countries including columns country_id,country_name and region_id which already exists.
6. Write a SQL statement to create a table named jobs including columns job_id, job_title, min_salary, max_salary and check whether the max_salary amount exceeding the upper limit 25000.
7. Write a SQL statement to create a table named job_histry including columns employee_id, start_date, end_date, job_id and department_id and make sure that the value against column end_date will be entered at the time of insertion to the format like '--/--/----'.
8. Write a SQL statement to create a table named countries including columns country_id,country_name and region_id and make sure that no duplicate data against column country_id will be allowed at the time of insertion
9. Write a SQL statement to create a table named jobs including columns job_id, job_title, min_salary and max_salary, and make sure that, the default value for job_title is blank and min_salary is 8000 and max_salary is NULL will be entered automatically at the time of insertion if no value assigned for the specified columns
10. Write a SQL statement to insert one row in jobs table to ensure that no duplicate value will be entered in the job_id column.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
