Querying Microsoft SQL Server 2012/2014 — Question 52
You administer a Microsoft SQL Server instance that will support several databases.
You need to ensure that the organization serial numbers can be stored in every new database created. You also need to ensure that the serial numbers are six alphanumeric characters and have the same structure across every database.
What should you do?
Answer options
- A. Create a user-defined data type on the master database.
- B. Create a user-defined type on the master database.
- C. Create a user-defined data type on the model database.
- D. Create a user-defined type on the model database.
Correct answer: D
Explanation
The correct answer is D because creating a user-defined type in the model database ensures that all new databases inherit this type, maintaining consistency across them. Options A and B are incorrect as they involve the master database, which does not affect new databases. Option C is incorrect because it refers to a user-defined data type instead of a user-defined type.