Select Distinct vs Select Single
SINGLE
The result of the selection should be a single entry. If it is not possible to identify a unique entry, the system uses the first line of the selection. If you use the FOR UPDATE addition, the selected entry is protected against parallel updates from other transactions until the next database commit (see LUW and database lock mechanism). If the database system identifies a deadlock, a runtime error occurs.
DISTINCT
Duplicate entries in the result set are automatically deleted.
沒有留言:
張貼留言