📞 0339-0387701 (WhatsApp)
Contact
☰
🔍
Home
Important MCQs
Computer
Current Affairs
Data Science & AI (NCCIA)
Database & Data Handling (NCCIA)
English
Everyday Science
General Knowledge
General Science
Information & Networking (NCCIA)
Islamic Studies MCQs
Maths MCQs
Pak Study
Pedagogy
Software Engineering (NCCIA)
Telecom / Electrical Fundamentals (NCCIA)
Urdu MCQs
Past Papers
ASF Past Papers
FIA Past Papers
FPSC Past Papers
NCCIA Past Papers
NTS Past Papers
PPSC Past Papers
Latest Jobs
Army Jobs
Education Department
Federal Govt Jobs
Health Department
Police Jobs
Sindh Govt Jobs
Resources
About Us
Contact
🔍
Home
» Which constraint would prevent storing a negative quantity in an Orders table?
« Back to Database & Data Handling (NCCIA)
Which constraint would prevent storing a negative quantity in an Orders table?
A. DEFAULT 0 on Quantity
B. UNIQUE (Quantity)
C. CHECK (Quantity >= 0) ✅
D. FOREIGN KEY (Quantity)
Correct Answer:
C. CHECK (Quantity >= 0)
Explanation
CHECK (Quantity >= 0) rejects negative quantities.
DEFAULT only supplies a value when none is given and does not block negatives.
« If a table has a PRIMARY KEY on StudentID, what…
What does NULL mean in a database? »
Related MCQs
Which property holds for rows in a relational table?
Which example shows data becoming information?
A surrogate key is also known as:
A naive (parametric) end user is one who:
When converting an ER model to a relational schema, what does each strong entity set become?
Why is a backup schedule important?
How is a recursive relationship also known?
What is an alternate key?