UGC-NET Jun 2015 · SQL Queries

MCQ · 2 marks · Problem DBMS-SQL-0017

An Assertion is predicate expressing a condition we wish database to always satisfy. The correct syntax for Assertion is:
  1. A
    CREATE ASSERTION 'ASSERTION Name' CHECK 'Predicate'
  2. B
    CREATE ASSERTION 'ASSERTION Name'
  3. C
    CREATE ASSERTION, CHECK 'Predicate'
  4. D
    SELECT ASSERTION

Solve it on GATE DA practice →More Relational Model & SQL problems

Show the worked solutionSQL syntax for an assertion:\[\text{CREATE ASSERTION } \langle\text{name}\rangle \text{ CHECK } (\langle\text{predicate}\rangle);\]It needs both a name and the CHECK predicate.(B) Has no predicate — incorrect.(C) Has no name — incorrect.(D) SELECT is a query, not a DDL statement — incorrect.Answer: A

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com