Select Query
- 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;
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
Status, Person_pi, Last_Name are “column aliases” and Keyword “AS” is optional.
- Which Keyword is used to remove duplicate rows in result set?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
DISTINCT
- 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;
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
DISTINICT keyword will remove the duplicate entries in the result set.
- 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;
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
DISTINICT keyword will remove the duplicate entries in the result set.
- Which among the following is an optional Keyword?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
“AS” and “ALL” are optional.