What SQL command should a DBA use to combine multiple fields from tables into a view while preventing modifications?

Enhance your data management skills with the CompTIA DataSys+ Test. Explore flashcards and multiple-choice questions, complete with hints and explanations. Prepare effectively for your certification exam and boost your confidence!

Multiple Choice

What SQL command should a DBA use to combine multiple fields from tables into a view while preventing modifications?

The use of the CREATE VIEW and SELECT command is appropriate in this scenario because the purpose of creating a view is to present data from one or more tables in a specific format or structure without allowing direct modifications to the underlying data. A view is essentially a stored query that can combine fields from multiple tables and can limit access to sensitive information.

When a DBA creates a view using the CREATE VIEW command along with a SELECT statement, they can define the specific columns and data that should be included in the view. This ensures that users can retrieve information in a structured way without altering the original data within the tables. Furthermore, views can be designed to prevent modifications by using options that disallow updates or by including only specific fields that do not permit changes.

The other options are not suited for the requirement here. Using ALTER TABLE and UPDATE would imply making changes to the structure or data directly in the tables, which contradicts the goal of preventing modifications. CREATE TABLE and MODIFY suggests a creation and modification of tables themselves, which does not relate to combining fields into a view. Finally, CREATE VIEW and DROP are misaligned because DROP is used to delete a database object, rather than to create a view. Thus, the choice involving CREATE VIEW and SELECT is clearly the most

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy