| Home | Previous Lesson: Syntax Next Lesson: Retrieval Arguments |
When you are creating a SELECT statement, you can ensure that no duplicate rows are displayed by checking the Distinct option under the Design menu. PowerBuilder adds the word DISTINCT clause right after the SELECT.
There won't be a match if two columns with NULL values are compared for equality in a WHERE clause unless you use IsNull() Sybase function. If you are using one of the more flexible database engines, you can get around this problem by using the DISTINCT clause.
When using SQL Anywhere SQL, specifying DISTINCT automatically sorts the result sets, but this isn't true with SQL Server and is something that should be noted when porting applications from one database to another.
| Home | Previous Lesson: Syntax Next Lesson: Retrieval Arguments |