Answer & Solution
Answer: Option B
Solution:
In SQL, comparison operators are used to compare values in the WHERE clause to filter rows based on specified conditions. The correct usage of these operators is as follows:
Greater than (>): Compares if a value is greater than another.
Less than (<): Compares if a value is less than another.
The correct SQL syntax for using comparison operators to filter rows where the "age" column is greater than 50 and less than 80 is as shown in "Option B."
Let's break down the correct query:
SELECT name, course_name: This part of the query specifies the columns to be retrieved in the result.
FROM student: It specifies the table from which the data is retrieved.
WHERE age > 50 and age < 80: This part specifies the conditions for filtering the rows. It correctly uses the ">" and "<" comparison operators to filter rows where the "age" column is greater than 50 and less than 80.
The correct option, therefore, is
"Option B."