Oracle__8. Oracle 1Z0-051 Exam - View Objects Flashcards
(47 cards)
What happens to transactions if an ALTER VIEW is executed?
An implicit commit will be execute before the GRANT command.
Can a view be created upon a view?
Yes
Can a table and a view have the same name in the same schema?
No
Can a table and a synonym have the same name in the same schema?
Yes.But do not know why someone would do it
What happens with privileges with these 2 statements? DROP VIEW sales_vu; CREATE VIEW sales_vu as SELECT * FROM sales_tbl
Specific privileges to the view will be lost. This also means specific REVOKE privileges will also be lost.
What happens with privileges with this statement? CREATE OR REPLACE VIEW sales vu as SELECT * FROM sales_tbl
The privileges remain the same as previous
What happens to a VIEW if the underlying table is renamed?
The reference in the view is also changed to the new table name
What is the syntax for an insert statement if more than one record?
INSERT ALL INTO (field1, field2…) VALUES (exp1, exp2, …) INTO (field1, field2…) VALUES (exp1, exp2, …) INTO (field1, field2…) VALUES (exp1, exp2, …)SELECT * FROM dual;
What is the syntax of an INSERT statement where the field name list can be eliminated?
INSERT INTO table2 SELECT * FROM table1All the fieldname and data type must match and be in the same order between the 2 tables
What is left after a TRUNCATE table statement?
The table structure is left intact, but all data has been removed
Are dates format sensitive when sorted?
Yes.
What keyword from a SEQUENCE object refers to the last sequence number that has been generated?
CURRVAL
Are numbers generated from a sequence object only available for one table?
No.Sequence number are available to multiple tables or queries.
What happens when the sequence object reached the MAXVALUE.
an additional request for a NEXTVAL will receive an error
What statement can be used to increase the maximum value of a Sequence object?
ALTER SEQUENCE sequencename MAXVALUE newvalue
What happens with sequence number if any are used in a transaction and the transactions is rolled back?
They are lost.
What is the syntax to remove a sequence object from a database?
DROP SEQUENCE sequencename
What happens to a Sequence object when a table is dropped?
Nothing
What is also created when a primary key is created?
A unique index.Primary keys cannot be duplicated
Can a public synonym and a private synonym exist with the same name for the same table?
YesThe private synonym takes precedence over the public synonym
What is a composite index?
An index with 2 or more columns
Savepoint can be used to rollback DML statement or DDL statements or both?
Only DML statements
What happens to a SAVEPOINT after a commit?
It is deleted
What happens with this series of statements in a transaction? DELETE * FROM table1 WHERE field = 1 SAVEPOINT test DELETE * FROM table1 WHERE field = 2 SAVEPOINT test ROLLBACK TO test;
The second SAVEPOINT over writes the first SAVEPOINT because the savepoint name is the same.