PrepAway - Latest Free Exam Questions & Answers

Which statement or statements should you execute?

The database contains a disk-based table named ContentTable that has 1 million rows and
a column named Fax. Fax allows null values.
You need to update Fax to meet the following requirements:
Prevent null values from being used.
Always use an empty string instead of a null value.
Which statement or statements should you execute? (Each correct answer presents part of
the solution. Choose all that apply.)

PrepAway - Latest Free Exam Questions & Answers

A.
Option A

B.
Option B

C.
Option C

D.
Option D
Option E

D.
Option D
Option E

Explanation:

E: First change the NULLs to ‘ ‘.
A: Then set the default to the column to ‘ ‘.
B: Finally add the NOT NULL constraint to the column.

7 Comments on “Which statement or statements should you execute?

  1. Modi says:

    Yes it has to be A,B,E
    A- Gives the “” in case if the user forget to enter a value for FAX
    B- Prevent User from Enter new Null Value
    E- Change the old Entered of the million record “Null” to be “”




    0



    0
  2. Slazenjer_m says:

    Correct answers are A & E. Option B would only complicate things if users do NOT have a valid Fax number. By leaving the ‘entries’ for Fax as NULL, the Default constraint implicitly assigns a ” string in place of any null (unknown value) from the user.




    0



    0
    1. Skippo says:

      Exactly why option B is not needed. If you update some records and do NOT provide any value in the Fax column, it DEFAULTS to an empty ” ” string (by virtue of option A).

      So, option B is not needed. Else, people will be compelled to enter incorrect value for an unknown (non-applicable) field.




      0



      0

Leave a Reply