Create an empty table called SECTION2 with the same structure as the SECTION table. Create a view on the SECTION2 table that will be used for updating the table and restricts updates to sections with capacities that are less than 25. Write two INSERT statements – one that succeeds and one that fails and that uses the view to insert into the SECTION2 table.
What will be an ideal response?
```
CREATE TABLE section2 AS
SELECT *
FROM section
WHERE 1=2
CREATE VIEW v_section2 AS
SELECT *
FROM section2
WHERE capacity < 25
WITH CHECK OPTION
-- should succeed
INSERT INTO v_section2
VALUES (1,1,1,sysdate,NULL,102,15,user,sysdate,user,sysdate)
--should fail
INSERT INTO v_section2
VALUES (1,1,1,sysdate,NULL,102,30,user,sysdate,user,sysdate)
```
You might also like to view...
A section break is a portion of the document that can be formatted differently from the rest of the document
Indicate whether the statement is true or false
Write a single C++ statement or line that accomplishes each of the following:
a) Print the message "Enter two numbers". b) Assign the product of variables b and c to variable a. c) State that a program performs a payroll calculation (i.e., use text that helps to document a program). d) Input three integer values from the keyboard into integer variables a, b and c.
To improve accuracy during user input, a designer can add context to the ________ from the properties screen which will be displayed in the status bar to provide additional information to users who are entering data
A) Details B) Description C) Info D) Data Type
The ____________________ object allows the user to select one date from a calendar of dates and times.
Fill in the blank(s) with the appropriate word(s).