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

Consider the following two commands C1 and C2 on the relation R from an SQL database:

Consider the following two commands C1 and C2 on the relation R from an SQL database: C1: drop table R; C2: delete from R; Which of the following statements is TRUE? I. Both C1 and C2 delete the schema for R. II. C2 retains relation R, but deletes all tuples in R. III. C1 deletes not only all tuples of R, but also the schema for R.
  1. AI only
  2. BI and II only
  3. CII and III only
  4. DI, II and III
Show answerHide answer

Correct answer: (C) II and III only

Explanation

Drop command remove all tuples of the relation as well as schema also. Delete command in SQL removes tuples from the relation but retain the schema of table in database.

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

This is question 30 of UGC NET Computer Science PYQ, June 2016 (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.