Home / CSE / SQL Basics :: Discussion

Discussion :: SQL Basics

  1. Which of the SQL statements is correct?

  2. A.

     SELECT Username AND Password FROM Users

    B.

     SELECT Username, Password FROM Users

    C.

     SELECT Username, Password WHERE Username = 'user1'

    D.

     None of these

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    Correct order of SELECT, FROM and WHERE clause is as follow:
    SELECT column_name1, column_name2, ....
    FROM table_name
    WHERE condition

    So, only
    SELECT Username, Password FROM Users
    follows the above syntax.


Be The First To Comment