Question 25Asked in UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)

An assertion is a predicate expressing a condition we wish database to always satisfy. The correct syntax for Assertion is :

  1. ACREATE ASSERTION 'ASSERTION Name' CHECK 'Predicate'
  2. BCREATE ASSERTION 'ASSERTION Name'
  3. CCREATE ASSERTION, CHECK Predicate
  4. DSELECT ASSERTION
Show answerHide answer

Correct answer: (A) CREATE ASSERTION 'ASSERTION Name' CHECK 'Predicate'

Explanation

CREATE ASSERTION <assertion name> CHECK <predicate> is the proper syntax. For example, an assertion demanding that there is no more than one president among the employees: CREATE ASSERTION AT_MOST_ONE_PRESIDENT CHECK ((SELECT COUNT(*) FROM EMP e WHERE e.job = 'PRESIDENT') <= 1).

From UGC NET Computer Science PYQ, June 2015 (Paper II & III, Selected Questions)

This is question 25 of UGC NET Computer Science PYQ, June 2015 (Paper II & III, Selected Questions). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.