Select Query


  1. If in Table “Customer”, a column “Customer_id” consists of {1,2,2,3,3,5,6,7,8,8} then what will be the output on executing the following query?
    SELECT DISTINICT emp_id
    FROM employee;











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    DISTINICT keyword will remove the duplicate entries in the result set.


  1. If in Table “account”, a column “Customer_id” consists of {1,2,2,3,3,5,6,7,8,8} then what will be the output on executing the following query?
    SELECT DISTINICT Customer_id
    FROM account;











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    DISTINICT keyword will remove the duplicate entries in the result set.



  1. Which Keyword is used to remove duplicate rows in result set?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    DISTINCT


  1. What will be the result of the query given below?
    SELECT Person_id,
    ‘ACTIVE’ AS STATUS,
    Person_id * 3.14 AS Person_pi,
    UPPER (LName) AS Last_Name
    FROM Person;











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Status, Person_pi, Last_Name are “column aliases” and Keyword “AS” is optional.



  1. What will be the result of the query given below?
    SELECT Student_id,
    ‘ACTIVE’ STATUS,
    Student_id * 3.14 Student_pi,
    UPPER (LName) Last_Name
    FROM Student;











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Status, Student_pi, Last_Name are “column aliases”.