Table Column Attributes  «Prev  Next»

Create Transact-SQL Datatype - Exercise

Creating a User-Defined Datatype

Objective: Create your own datatype.

Exercise Scoring

This exercise is worth a total of 5 points. You will receive up to 5 points for submitting the correct Transact-SQL syntax required to create your own datatype.

Instructions

Construct a Transact-SQL statement that creates a user-defined datatype with the following attributes:

  1. Name the datatype zipcode.
  2. Base it on exactly 5 characters.
  3. Allow NULL values.

Submitting the Exercise

Type or paste your Transact-SQL statement into the text box above, then click Submit to submit your answer and view a results page.