πŸ“Š MySQL
Q. What will be the output of the following SQL statement?
SELECT * FROM person
WHERE person_id=1;
  • (A) Show all columns but only those rows which belongs to person_id=1
  • (B) Show all columns and rows
  • (C) Shows only columns person_id
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (A) Show all columns but only those rows which belongs to person_id=1

Explanation: The given SQL statement is a SELECT query that retrieves data from the "person" table where the "person_id" column equals 1. The WHERE clause filters the rows to only those where person_id=1. Therefore, the query will return all columns, but only the rows where person_id=1. Hence, Option A is correct.

Explanation by: Sonali Mishra
The given SQL statement is a SELECT query that retrieves data from the "person" table where the "person_id" column equals 1. The WHERE clause filters the rows to only those where person_id=1. Therefore, the query will return all columns, but only the rows where person_id=1. Hence, Option A is correct.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
91
Total Visits
πŸ“½οΈ
12 mo ago
Published
πŸŽ–οΈ
Sonali Mishra
Publisher
πŸ“ˆ
89%
Success Rate