A subquery in an SQL SELECT statement is enclosed in

By Anjnee Bhatnagar|Updated : June 29th, 2022

A subquery in an SQL SELECT statement is enclosed in:

  1. Braces-{…}.
  2. CAPITAL LETTERS.
  3. Parenthesis-(…).
  4. Brackets-[…].

Answer: Option C. Parenthesis-(…)

A subquery in an SQL SELECT statement is enclosed in parenthesis-(…).

Solution

A subquery in an SQL SELECT statement is enclosed in parenthesis-(…). In SQL, to enclose a subquery within a query, only parenthesis are used. To enclose subquery in SQL, brackets, braces, and capital letters are never used. However, SQL commands are written in capital letters for the convenience of the user to differentiate between data and SQL commands. Following is the syntax of enclosing a subquery within a query:

SELECT columnname

FROM tablename

WHERE columnname operator

(

SELECT columnname

 FROM tablename

WHERE condition

);

☛ Related Questions:

Comments

write a comment

Follow us for latest updates