MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
To remove duplicate rows from the results of an SQL SELECT statement, the ____ qualifier specified must be included.
A
ONLY
B
UNIQUE
C
DISTINCT
D
SINGLE
Explanation: 

Detailed explanation-1: -The go to solution for removing duplicate rows from your result sets is to include the distinct keyword in your select statement. It tells the query engine to remove duplicates to produce a result set in which every row is unique.

Detailed explanation-2: -Simply use the DISTINCT keyword after SELECT if you want to select only non-repeated rows. This keyword forces the query to discard any duplicate rows, based only on the columns you listed.

Detailed explanation-3: -By default, SQL queries show all the returned rows, including duplicate rows, in the result set. The DISTINCT keyword in the SELECT clause is used to eliminate duplicate rows and display a unique list of values. In other words, the DISTINCT keyword retrieves unique values from a table.

Detailed explanation-4: -Answer: The DISTINCT keyword is used to remove the duplicate rows in a table.

There is 1 question to complete.