Reputation: 1093
Would like to grab ALL data from this row, but trying to weed out the duplicate data.
Current query:
SELECT DISTINCT(cDeviceRegistrationID) FROM tblUsers WHERE cDeviceRegistrationID > '';
This returns only the one column of data, but I would like to get all the other data too.
This isn't working for me as it will still return rows with the same cDeviceRegistrationID:
SELECT * FROM tblUsers WHERE cDeviceRegistrationID > '';
Upvotes: 0
Views: 297
Reputation: 492
SELECT * FROM tblUsers WHERE cDeviceRegistrationID > '' GROUP BY cDeviceRegistrationID
This method is preferred since you can take advantage of indexes (index cDeviceRegistrationID).
Upvotes: 3