Which one is a DCL command in SQL?

2019

Which one is a DCL command in SQL?

  1. A.

    UPDATE

  2. B.

    SELECT

  3. C.

    DELETE

  4. D.

    GRANT

  5. E.

    None of these

Attempted by 1272 students.

Show answer & explanation

Correct answer: D

DCL (Data Control Language) commands are used to control access to data in a database. They manage permissions and roles for users. Common DCL commands include GRANT and REVOKE. Let's analyze each option: UPDATE: This command modifies existing data in a table. It belongs to DML (Data Manipulation Language), not DCL. SELECT: This command retrieves data from a database. It is part of DQL (Data Query Language), not DCL. DELETE: This command removes records from a table. It is a DML command, not DCL. GRANT: This command gives specific privileges to users or roles. It is a DCL command used for access control. None of these: This option is incorrect because GRANT is a DCL command, so at least one option is correct. Therefore, the correct answer is GRANT, which is a DCL command.

Explore the full course: Bpsc