1

Create a rule called Makedata to allow only the following values to the make of the data: txt, excel, word, rar, and powerpoint.

You must attach the rule to column Make in the datatype table

What does this question mean? I don't want a solution just an explanation.

Thank you

Community
  • 1
  • 1

1 Answers1

1

You are asked to filter the values that can be stored in that data column. For this you can use enum data type if were using MySQL. To fit your case take a look at: SQL Server equivalent to MySQL enum data type?

Alter your table with:

column_name VARCHAR(255) NOT NULL CHECK (column_name IN('txt', 'excel', 'word', 'rar', 'powerpoint'))
BDS
  • 200
  • 10