subject

* Ocelot exercise database presented in SQL basics 1 will be used in this exercise * Return exercise in .txt format and use formatting presented below (question always followed be the query)
-- Select all employees from table
SELECT * FROM EMPS;
* In this exercise you will add a new table to Ocelot training database, which will be used to describe the history of employee salary.
Create tables
1. Create a new table called salarydata with the following columns:
* salarydataID (primary key)
* salary (the amount of salary described with two decimals)
2. Create a connection between salarydata and emps tables (Tip: First think what column you should bring from emps table and then create a new column for it). Use the following options in foreign key definition:
* UPDATE CASCADE
* DELETE NO ACTION
Editing table properties
* Important: Do not include the following tasks with the CREATE TABLE statement used in the first exercise but rather add them using a separate query!
3. Add a new column called last_update. The current date should be added automatically for this column when new data is inserted.
4. Add automatic counter for salarydataID column so that this field value will be automatically generated each time a new data is inserted.
Input validation
5. Create input validation check with TRIGGER. The following checks has to be made:
* Salary cannot be under 1000 and cannot exceed 12000 euros.
* Salary value must be even (salary % 2 = 0). For example, only salary values 1000, 1002, 1004 etc. are accepted.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:40
Write an assembly program with the following specifications.a). in the main block, you should have two registers r4 and r5. they should be checked in an infinite loop. if r4 is greater than r5, then the greater subroutine will be called. if r4 is less than r5, then the less subroutine will be called. if r4 equals r5, then no operations will be done
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
Corey set up his presentation for delivery to his team.the information he had to convey was critical to their job performance.he knew he would need a lot of time to explain each point
Answers: 3
question
Computers and Technology, 22.06.2019 22:50
Which is the best minecraft server? a. mineplex b. worldonecraft c. 9b9t d. 2b2t
Answers: 2
question
Computers and Technology, 23.06.2019 07:30
What are ways to switch windows in excel? check all that apply. on the status bar, click the windows button, and then click the file name. on the task bar, click to display the excel jump list, and then click the file name. on the view tab, in the window group, click switch windows, and then click the file name. on the review tab, in the viewing group, click files, and then click the file name.
Answers: 1
You know the right answer?
* Ocelot exercise database presented in SQL basics 1 will be used in this exercise * Return exerci...
Questions
question
English, 16.02.2021 20:20
question
Health, 16.02.2021 20:20
question
English, 16.02.2021 20:30
question
Mathematics, 16.02.2021 20:30
question
Mathematics, 16.02.2021 20:30
question
Mathematics, 16.02.2021 20:30
Questions on the website: 13722363