CREATE TABLE Drinkers (
name VARCHAR(20) PRIMARY KEY,
addr VARCHAR(200)
DEFAULT '123 Sesame St.',
phone VARCHAR(16) NOT NULL
salary REAL,
position VARCHAR(20)
);
1- add constraint to enforce 100,000 > salary >1,000.
2- add constraint to enforce salary > 30,000 if position is 'Manager'
3- Create a trigger, named SalaryTrig, to record drinker name, his/her new salary
and old salary (in another table, named HighManagers which you need to create
first) for a 'Manager' drinker when his/her salary is changed to be higher than or
equal to 50,000 if his/her old salary is less than 50,000.
4- Write insert-statements to add drinkers to add drinkers' information below
name
addr
phone
salary
position
larry
newyork
12345
10.000
bos meg
newyork
22222
60.000
manager
chief josh
newyork
33333
35.000
manager
stewart
newyork
44444
20.000
Then, update the salary for all managers to be 70,000. Show the results of your
HighManagers table.