📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

What is the effect of declaring a column as INT UNSIGNED in MySQL?

A. It allows negative numbers only
B. It makes the column a primary key
C. It stores text instead of numbers
D. It allows only zero and positive numbers, doubling the positive range ✅

Correct Answer: D. It allows only zero and positive numbers, doubling the positive range

Explanation

  • UNSIGNED forbids negative values and extends the positive range.
  • It is useful for counts and IDs that are never negative.