Q.Which of the following SQL command can change the degree of the existing relation ? (A) DROP TABLE (B) ALTER TABLE (C) UPDATE…SET (D) DELETE
You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
Start your 14-day free trial to unlock the full solution →The degree of a relation is the number of attributes (columns) it has. To change the degree, you must add or remove a column. The SQL command that adds or drops columns is ALTER TABLE. So the correct option is (B).
The concept: degree of a relation
In relational database terminology, the degree of a relation (table) is simply the number of attributes (columns) it contains. For example, a Student table with columns RollNo, Name, Age has degree 3.
If you want to change the degree, you must either add a new column (increasing the degree) or remove an existing column (decreasing the degree). This is a structural change to the table schema — not a change to the data inside the table.
Why each option does or doesn't change the degree
Let's examine each SQL command:
-
DROP TABLE— This removes the entire table from the database. It doesn't change the degree of an existing relation; it destroys the relation itself. So this is not about altering degree. -
ALTER TABLE— This command is specifically designed to modify the structure of an existing table. You can use it with clauses like:ADD column_name datatype— adds a new column, increasing the degree.DROP COLUMN column_name— removes an existing column, decreasing the degree.
Therefore,
ALTER TABLEcan directly change the degree of a relation. -
UPDATE…SET— This modifies the values of existing rows in a table. It changes the content of cells, but it never adds or removes columns. The degree remains exactly the same. -
DELETE— This removes rows (tuples) from a table. It changes the cardinality (number of rows), but not the degree. The column structure is untouched. …
Unlock everything free for 14 days
- Full step-by-step solutions
- Concept-first explanations
- Methods, shortcuts & mistakes
- PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.