Zend PHP 5.3 Certification Exam
Databases and SQL
Functions and Arrays
Object Oriented Programming
Data Format & Types
Strings and Patterns
Web Features 1
You want to retrieve all the data from any given table. You also want to ensure that no duplicate values are displayed. Which of the following SQL statements will you use to accomplish the task?
Answer option A is correct.
In order to accomplish the task, you will use the SELECT...DISTINCT statement. The DISTINCT clause is used to eliminate duplicate rows from the specified table.
Answer option C is incorrect. The SELECT...ALL statement is used to display all the rows in a table, including duplicate rows.
Answer option D is incorrect. The SELECT...TOP statement is used to display the first set of the rows specified in the TOP clause.
Answer option B is incorrect. The SELECT...WHERE statement is used to filter the data in a table.
© 2013 Zend PHP Certification Exam