Universal Database (netDB2) Introductory GuideSorting And Retrieving Distinct DataIn case the user wants to sort tables in a particular fashion, they can use the "ORDER BY" command. To eliminate the duplicate rows available use the "DISTINCT" command.This helps in avoiding redundancy in the database.
This shall give the user an ordered list of all the students in a sorted order ,
This example, results in all distinct data. As we can notice that the example can have redundant data since name is not a primary key. Using the distinct command one can view data thats not repeated.
|