Q. ________________ is not a category of SQL command.

  • (A) DDL
  • (B) DCL
  • (C) SCL
  • (D) TCL
πŸ’¬ Discuss
βœ… Correct Answer: (C) SCL

Q. Which of the following are TCL commands?

  • (A) ROLLBACK and SAVEPOINT
  • (B) GRANT and REVOKE
  • (C) SELECT and INSERT
  • (D) UPDATE and TRUNCATE
πŸ’¬ Discuss
βœ… Correct Answer: (A) ROLLBACK and SAVEPOINT

Q. Which of the following is not a DDL command?

  • (A) ALTER
  • (B) UPDATE
  • (C) TRUNCATE
  • (D) None of the Mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (B) UPDATE

Q. ___________removes all rows from a table without logging the individual row deletions.

  • (A) TRUNCATE
  • (B) DROP
  • (C) REMOVE
  • (D) DELETE
πŸ’¬ Discuss
βœ… Correct Answer: (A) TRUNCATE

Q. The UPDATE SQL clause can _____________

  • (A) update only one row at a time
  • (B) update more than one row at a time
  • (C) delete more than one row at a time
  • (D) delete only one row at a time
πŸ’¬ Discuss
βœ… Correct Answer: (B) update more than one row at a time

Q. The UNION SQL clause can be used with _____________

  • (A) SELECT clause only
  • (B) DELETE and UPDATE clauses
  • (C) UPDATE clause only
  • (D) All of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (A) SELECT clause only

Q. Which SQL statement is used to return only different values?

  • (A) SELECT DIFFERENT
  • (B) SELECT UNIQUE
  • (C) SELECT DISTINCT
  • (D) SELECT ALL
πŸ’¬ Discuss
βœ… Correct Answer: (C) SELECT DISTINCT

Q. How can you change “Hansen” into “Nilsen” in the “LastName” column in the Persons table?

  • (A) UPDATE Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’
  • (B) MODIFY Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’
  • (C) MODIFY Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’
  • (D) UPDATE Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’
πŸ’¬ Discuss
βœ… Correct Answer: (D) UPDATE Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’

Q. Which TCL command undo all the updates performed by the SQL in the transaction?

  • (A) DELETE
  • (B) TRUNCATE
  • (C) COMMIT
  • (D) ROLLBACK
πŸ’¬ Discuss
βœ… Correct Answer: (C) COMMIT

Q. SQL query to find all the cities whose humidity is 95.

  • (A) SELECT city WHERE humidity = 95
  • (B) SELECT city FROM weather WHERE humidity = 95
  • (C) SELECT humidity = 89 FROM weather
  • (D) SELECT city FROM weather
πŸ’¬ Discuss
βœ… Correct Answer: (B) SELECT city FROM weather WHERE humidity = 95