MCQs – SQL Basics

(Last Updated On: March 28, 2018)

Q) In a sql subquery , which operator is used to check for existence of record ?

  1. SQL NOT NULL
  2. SQL AS
  3. SQL EXISTS
  4. NONE
View Answer
Answer: C
The EXISTS operator returns true if the subquery returns one or more records.


 

Q) Correct SQL query syntax to update a record from a table is

    1. UPDATE table_name

SET column1 = value1, column2 = value2, …
WHERE condition;

  1. UPDATE table_name
    SET COLUMN column1 = value1, column2 = value2, …
    WHERE condition;
  2. UPDATE table_name
    UPDATE column1 = value1, column2 = value2, …
    WHERE condition;
  3. UPDATE table_name
    column1 = value1, column2 = value2, …
    WHERE condition;
View Answer
Answer: A


Q) Which is called as a virtual table in SQL?

  1. INNER JOIN
  2. JOIN
  3. VIEW
  4. NONE
View Answer
Answer: C
In SQL, the view is a virtual table based on the result-set of an SQL statement.