• Login

DataSoft Corporation

DISTINCT

Include the DISTINCT keyword in your SELECT statement to direct Pervasive PSQL to remove duplicate values from the result. By using DISTINCT, you can retrieve all unique rows that match the SELECT statement's specifications.

  • You can use DISTINCT in any statement that includes subqueries.
  • The DISTINCT keyword is ignored if the selection list contains an aggregate; the aggregate guarantees that no duplicate rows result.


The following rules apply to using the DISTINCT keyword:

The following usage of DISTINCT is not allowed:

SELECT DISTINCT column1, DISTINCT column2

Examples

The following statement retrieves all the unique courses taught by Professor Beir (who has a Faculty ID of 111191115):

SELECT DISTINCT c.Name 
FROM Course c, class cl 
WHERE c.name = cl.name AND cl.faculty_id = '111191115'
Thursday, 18 April 2019 Posted in Pervasive SQL Command
 DataSoft Store  Knowledgebase  Contact Us
 Sitemap  Privacy Policy
    Customer Service


Copyright © 2019 DataSoft Corporation All rights reserved.