Constraints prevent a table with dependencies from being deleted and can be created at the same time as the table or after the table is created. You can modify the structure of a NOT NULL constraint using the ALTER TABLE statement.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd
Constraints prevent a table with dependencies from being deleted and can be created at the same time as the table or after the table is created. You can modify the structure of a NOT NULL constraint using the ALTER TABLE statement.
Constraints prevent a table with dependencies from being deleted and can be created at the same time as the table or after the table is created. You can modify the structure of a NOT NULL constraint using the ALTER TABLE statement.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd
Constraints prevent a table with dependencies from being deleted and can be created at the same time as the table or after the table is created. You can modify the structure of a NOT NULL constraint using the ALTER TABLE statement.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd
Download as docx, pdf, or txt
You are on page 1of 3
1.
Which two statements about constraints are true? (Choose two.)
a. Constraints only enforce rules at the table level. b. Constraints prevent a table with dependencies from being deleted. c. You must provide a name for each constraint at the time of its creation. d. Constraints names are NOT required to follow the standard object-naming rules. e. Constraints can be created at the same time as the table or after the table is created.
2. You need to add a NOT NULL constraint to the QUANTITY column in the PO_DETAIL table. Which statement should you use to complete this task?
a. ALTER TABLE po_detail MODIFY (Quantity NOT NULL); b. ALTER TABLE po_detail ADD CONSTRAINT NOT NULL(quantity); c. ALTER TABLE po_detail MODIFY quantity CONSTRAINT NOT NULL; d. ALTER TABLE po_detail ADD CONSTRAINT quantity_nn NOT NULL(quantity);
3. Which four statements about oracle constrains are true? (Choose four.)
a. A CHECK constraint specifies a condition that must be true. b. A PRIMARY KEY constraint uniquely identifies each row of a table. c. A NOT NULL constraint ensures that null values are NOT allowed in a column. d. A UNIQUE constraint prohibits the input of nulls because nulls do NOT satisfy the constraint conditions. e. A UNIQUE constraint specifies a column or combination of columns whose values must be unique for all rows in a table. f. A PRIMARY KEY constraint allows null values in a column when the column is part of a set of columns that uniquely identifies each row.
4. Which two statements about NOT NULL constraints are true? (Choose two.)
a. NOT NULL constraints can only be defined at the column level. b. A NOT NULL constraint is stored in the data dictionary as a UNIQUE constraint. c. You can modify the structure of a NOT NULL constraint using the ALTER TABLE statement. d. You CANNOT add a NOT NULL constraint to an existing column using the ALTER TABLE statement. e. You CANNOT define a NOT NULL column if the column does NOT have a non-null value for every row.
5. For which two types of constraints will a unique index be automatically created? (Choose two)
a. CHECK b. UNIQUE c. NOT NULL d. FOREIGN KEY e. PRIMARY KEY
6. Which statements concerning the creation of a view are true? (Choose all that apply.)
a. View columns that are the result of derived values must be given a column alias. b. A constraint name must be provided when using the WITH CHECK OPTION clause or the statement will fail. c. A view may have column names that are different than the actual base table(s) column names by using column aliases. d. When the view already exists, using the OR REPLACE option requires the re_granting of the object privileges previously granted on the view.
7. You created a view that contains groups of data does NOT allow DML operations, and does not contain a subquery. Which type of view did you create?
a. simple b. inline c. complex d. explicit
8. You created the CUST_ACCOUNT_V view. Before you begin creating reports, you want to review the column derivations for accuracy. Which statement should you use?
a. DESCRIBE user_views b. DESC cust_account_v c. SELECT text FROM user_views WHERE view_name = ‘CUST_ACCOUNT_V; a. SELECT text FROM user_objects WHERE view_name = ‘CUST_ACCOUNT_V’;
5. You want to create a view that when queried will display the name, customer identification number, new balance, finance charge, and credit limit of all customers. When queried, the display should be sorted by credit limit from highest to lowest, then by last name alphabetically. The view definition should be created regardless of the existence of the CUSTOMER or ACCOUNT tables. No DML may be performed when using this view. Evaluate these statements:
CREATE OR REPALCE FORCE VIEW cust_credit_v AS SELECT c.last_name, c.first_name, c.customer_id, a.new_balance, a.finance_change, a.credit_limit FROM customer c, account a WHERE c.account_id = a.account_id WITH READ ONLY;
SELECT * FROM cust_credit_v ORDER BY credit_limit DESC, last_name;
Which statement is true?
a. When both statements are executed all of the desired results are achieved. b. The CREATE VIEW statement will fail because a view may NOT be created on tables that do NOT exits or are NOT accessible by the user. c. The statements will NOT return all of the desired results because the WITH CHECK OPTION clause is NOT included in the CREATE VIEW statement. d. To achieve all of the desired results this ORDER BY clause should be added to the CREATE VIEW statement: ‘ORDER BY a.credit_limit DESC, c.last_name’.
6. An application view is no longer needed. Which SQL statement should you use to remove the TRANS_HIS_V view?
a. DROP trans_hist_v; b. DELETE trans_hist_v; c. DROP VIEW trans_hist_v; d. TRUNCATE VIEW trans_hist_v;