In SQL, which operator is used to combine two conditions and returns true if both are true? MCQ with Answer and Explanation

In SQL, which operator is used to combine two conditions and returns true if both are true?
A. XOR
B. NOT
C. OR
D. AND
Answer: Option D
Solution (By JKSSB Mock Tests)
The AND operator returns true only if both conditions are true.

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Database Management System (DBMS) Questions

Question #1
Which of the following is a valid SQL statement to add a new column to a table?
A. ALTER TABLE table_name ADD column_name datatype;
B. Both A and C
C. ADD COLUMN TO table_name column_name datatype;
D. ALTER TABLE table_name ADD COLUMN column_name datatype;

Correct Answer: Option B


Explanation:
Both 'ADD column_name datatype' and 'ADD COLUMN column_name datatype' are valid syntax in some DBMS, but standard SQL uses 'ADD column_name datatype'. However, many DBMS support both.

This question belongs to: Computer Database Management System (DBMS)
Question #2
What does the SQL command 'INSERT INTO' do?
A. Deletes rows
B. Adds a new row to a table
C. Updates existing rows
D. Creates a table

Correct Answer: Option B


Explanation:
INSERT INTO is used to insert new records (rows) into a table.

This question belongs to: Computer Database Management System (DBMS)
Question #3
Which of the following is a non-aggregate function in SQL?
A. AVG()
B. LENGTH()
C. SUM()
D. COUNT()

Correct Answer: Option B


Explanation:
LENGTH() (or LEN()) is a string function that returns the length of a string, not an aggregate. SUM, COUNT, AVG are aggregates.

This question belongs to: Computer Database Management System (DBMS)