hamburger

A subquery in an SQL SELECT statement is enclosed in

By BYJU'S Exam Prep

Updated on: September 25th, 2023

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:

Our Apps Playstore
POPULAR EXAMS
SSC and Bank
Other Exams
GradeStack Learning Pvt. Ltd.Windsor IT Park, Tower - A, 2nd Floor, Sector 125, Noida, Uttar Pradesh 201303 help@byjusexamprep.com
Home Practice Test Series Premium