Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (45k points)
closed by

A. SELECT Username AND Password FROM Users

B. SELECT Username, Password FROM Users

C. SELECT Username, Password WHERE Username = 'user1'

D. None of these

closed

4 Answers

0 votes
by (11.4k points)
 
Best answer
The correct SQL statement is option B) SELECT Username, Password FROM Users. Option A is incorrect as the AND operator is not used for column selection. Option C is also incorrect as the WHERE clause should come after the SELECT statement. Thus, option B is the right choice for selecting the columns "Username" and "Password" from the table "Users".
0 votes
by (99k points)

The correct answer to the question “Which of the SQL statements is correct” is option (b). SELECT Username, Password FROM Users. And all the other options are incorrect. Wish to learn SQL, and become proficient in it? If so, then check out Intellipaat’s SQL certification course, from Intellipaat. Also, take a look at the following video on Learn SQL.

0 votes
by (7.8k points)
The correct SQL statement among the options provided is option B) SELECT Username, Password FROM Users.

Option A is incorrect because the AND operator is used for logical conditions, not for selecting multiple columns.

Option C is incorrect because the WHERE clause should come after the SELECT statement and specify the condition for filtering rows, not for selecting columns.

Therefore, option B is the correct choice as it selects the columns "Username" and "Password" from the table "Users".
0 votes
by (13k points)

B) SELECT Username, Password FROM Users.

Related questions

0 votes
1 answer
0 votes
1 answer
asked Jan 5, 2021 in SQL by Appu (6.1k points)
0 votes
1 answer
asked Dec 17, 2020 in SQL by Appu (6.1k points)

Browse Categories

...