Change theme: 
Search for :    
Previous Blogs
Transformers Blogs
Misc Blogs
Computer/Tech Logs
Movie Reviews
Popular Blogs
ASCII chart
Comment from Tamera on December 24, 2015
Configuring Speedstream 6520 For Modem Only Mode
Comment from Janet on September 13, 2015
Transformers Reviews: MP-19 Smokescreen
Comment from Silagra on August 1, 2015
Transformers Reviews: MP-21 Masterpiece (Bumble) Bee
Comment from google authorship check on June 26, 2015
Aww...It's a Cat...Meow
Comment from vxt on June 4, 2015

RSS Facebook Twitter Instagram
My Tweets
Select Distinct Example

The following example selects distinct on all the fields selected which is not always what you want.

SELECT DISTINCT id,company,address,phone FROM Company

In order to select distinct only on the company field you should modify the query to the following:

SELECT id,company,address,phone FROM company GROUP BY company

This should give the desired result for a listing of distinct company names.

Post a Comment

Type ... theqword tree.Please answer the question shown

Copyright © Viet Tran. All Rights Reserved. Powered by Content ManagerTM | Top