SSC IMD SA Mock 01 – Question 158

Question:

In SQL, which constraint ensures that all values in a column are distinct and none of them is NULL?

SQL में, कौन-सा कंस्ट्रेंट यह सुनिश्चित करता है कि किसी कॉलम के सभी मान अद्वितीय (Distinct) हों और उनमें से कोई भी NULL न हो?

Options:

  • PRIMARY KEY
  • UNIQUE
  • NOT NULL
  • FOREIGN KEY
  • PRIMARY KEY
  • UNIQUE
  • NOT NULL
  • FOREIGN KEY

Correct Answer: a)

Explanation:

A PRIMARY KEY constraint uniquely identifies each record and implicitly combines `UNIQUE` and `NOT NULL`. A simple `UNIQUE` constraint permits NULL values in SQL (Option a).

PRIMARY KEY में मानों का अद्वितीय (Unique) होना और NOT NULL होना दोनों अनिवार्य होता है (विकल्प a)।

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top