Next, write a SQL statement to create a single column relational table MESSAGE to store variable size strings no longer than 500 characters.
Your implementation must directly follow a comment with a specification of a subtask.
(1) First, write a SQL statement to create a new relational table SALARY that consists of
two columns salary_level and minimum_salary. The column
salary_level is defined the same type as it defined in a table LPOSITION. The
column minimum_salary type is decimal that can store the value between 0.00
and 999999.99. The primary of the SALARY is salary_level.
(2) Next, write SQL statements to inserts into the relation table SALARY information
about salary levels and minimum salaries by using the data in a table below.
+--------------+---------------------+
| Salary level | Minimum salary |
+--------------+---------------------+
| A | 56700.00 |
+--------------+---------------------+
| B | 65500.00 |
+--------------+---------------------+
| C | 77800.00 |
+--------------+---------------------+
| D | 89600.00 |
+--------------+---------------------+
| E | 105300.00 |
+--------------+---------------------+
(3) Next, write a SQL statement to modify the budget of the department School of Computing and Information Technology to 1500000.00.
(4) Next, write a SQL statement to create a single column relational table MESSAGE to store variable size strings no longer than 500 characters.
(5) Next, write a SQL statement to insert into the relational table MESSAGE information about the contents of a sample
"The budget of a department must greater than or equals to the total amount of minimum salaries paid for the employees working in the department."
The script must list the outcomes of verification of the consistency constraint as a single column table with the following messages as the rows in the table.
A department budget since the budget the total amount of minimum salary .
For example, if the budget of the department School of Computing and Information Technology is greater than the total amount of minimum salary for the employees in the department, then verification of the consistency constraint must return the following message.
A department School of Computing and Information Technology budget is valid since the budget 1500000.00 greater than or equals to the total amount minimum salary 1125100.00 If the budget of the department School of Physics is less than the total amount of minimum salary for the employees in the department, then verification of the consistency constraint must return the following message.
A department School of Physics budget is invalid since the budget 0.00 is less than the total amount minimum salary 1125100.00
Use a function CONCAT to create the messages like the one listed above.
I have done 1-4 . need help in ques 4. but would appreciate if u could answer every part for rechecking purpose. thanks
Step by step
Solved in 3 steps with 1 images