1.
Which DDL statement creates a new object?
Correct Answer
A. Create
Explanation
The correct answer is "Create". The Create statement is a Data Definition Language (DDL) statement that is used to create a new object in a database. It is commonly used to create tables, views, indexes, and other database objects. The Create statement specifies the name, structure, and properties of the object being created.
2.
The DROP statement ___ an object.
Correct Answer
B. Destroys
Explanation
The DROP statement is used to remove or delete an object from a database. When the DROP statement is executed, it destroys the specified object, effectively eliminating it from the database. This can include tables, views, indexes, or any other database object that is no longer needed or required.
3.
In order to modify an existing database object, we use the ___ statement.
Correct Answer
C. Alter
Explanation
To modify an existing database object, we use the "Alter" statement. This statement allows us to make changes to the structure or properties of a database object, such as tables, views, or procedures. It can be used to add or remove columns, change data types, modify constraints, or rename the object. The "Alter" statement is essential for making alterations to an existing database object without having to recreate it from scratch.
4.
This command "ALTER TABLE sink ADD bubbles INTEGER;" adds a...
Correct Answer
A. Column
Explanation
The given command "ALTER TABLE sink ADD bubbles INTEGER;" adds a column named "bubbles" to the table "sink" with the data type of INTEGER. This means that a new column will be created in the table, allowing for the storage of integer values in that column.
5.
All of the following are DDL statements except...
Correct Answer
D. Object
Explanation
The given answer is "Object". The reason for this is that "Rename", "Create", and "Alter" are all examples of Data Definition Language (DDL) statements. DDL statements are used to define or modify the structure of a database, such as creating tables, modifying columns, or renaming objects. On the other hand, "Object" is not a DDL statement but rather a general term that refers to any entity or item within a database, such as tables, views, or indexes.
6.
Which of these statements begins with alter?
Correct Answer
C. Audit
Explanation
The statement that begins with "alter" is "audit".
7.
Data definition language lets you create and alter ___ objects.
Correct Answer
D. Schema
Explanation
Data definition language (DDL) is used to create and alter database objects, such as tables, views, indexes, and schemas. A schema is a logical container that holds database objects, allowing users to organize and manage their data effectively. Therefore, the correct answer is "Schema."
8.
Which of these statements requires an exclusive access to a specified object?
Correct Answer
B. CREATE
Explanation
The statement "CREATE" requires exclusive access to a specified object because it involves creating a new object or entity in a database. When creating a new object, exclusive access is needed to ensure that no other operations or modifications are being made to the object simultaneously, which could lead to conflicts or inconsistencies.
9.
Which of these SQL statements can be used to grant or revoke privileges?
Correct Answer
C. DDL
Explanation
DDL stands for Data Definition Language, which is a subset of SQL used to define and manage the structure of a database. DDL statements like CREATE, ALTER, and DROP can be used to create, modify, or delete database objects such as tables, indexes, and views. In addition to these operations, DDL statements also include the ability to grant or revoke privileges on these objects. Therefore, the correct answer is DDL.
10.
The rename statement is used to ___ an object.
Correct Answer
A. Rename
Explanation
The rename statement is used to change the name of an object.