•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Database Design section within the Web Development category of DaniWeb, a massive community of 427,215 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,142 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Database Design advertiser: Programming Forums
Views: 1066 | Replies: 6
![]() |
•
•
Join Date: Dec 2007
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
By using the DISTINCT keyword,this can be achieved.The following example selects the distinct names from the employee table.
SELECT DISTINCT lname FROM employee.
By using the GROUP BY keyword,this can be achieved.The following example selects the distict names in the employee table,without using the DISTINCT keyword.
SELECT lname FROM employee GROUP BY lname.
SELECT DISTINCT lname FROM employee.
By using the GROUP BY keyword,this can be achieved.The following example selects the distict names in the employee table,without using the DISTINCT keyword.
SELECT lname FROM employee GROUP BY lname.
Last edited by anusri555 : Dec 10th, 2007 at 11:47 am. Reason: spelling mistakes
•
•
•
•
Hieo frnds...
Please help me out for finding the answer for this problem.
How can we get the duplicate rows from the table listed below using a single query.??
field1 field2 field3
1 2 3
2 4 5
2 4 5
3 4 3
1 2 3
1> select *,count(*) as instances from DUPS group by field1,field2,field3
2> go
field1 field2 field3 instances
----------- ----------- ----------- -----------
1 2 3 2
2 4 5 2
3 4 3 1
![]() |
•
•
•
•
•
•
•
•
DaniWeb Database Design Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
avatar backup breach business creative daniweb data data protection database design erp systems europe evaluation government hacker howto hp ibm illustrator medicine navigation news normalization photoshop print project research security selection server software solutions sql survey toread tutorials web
- Dot Net programmer wanted. Work from home. (Web Development Job Offers)
- memory management in wndows 2000 (Windows NT / 2000 / XP / 2003)
- C++ Books (C++)
- *** Cheap Hosting! - - LINUX or WINDOWS - - High quality website! *** (Web Hosting Deals)
- Northern VA - Data Modeler (Tech / IT Consultant Job Offers)
- Northern VA - Expert Data Architect (Tech / IT Consultant Job Offers)
- dynamically update pages (HTML and CSS)
- Senior Data Modeler Opportunity (Tech / IT Consultant Job Offers)
- Architect / Senior Programmer : Asp.net / C# (Web Development Job Offers)
- Team Lead C#, ASP.NET, VB.NET, Web Services, SQL - Los Angeles, CA (Web Development Job Offers)
Other Threads in the Database Design Forum
- Previous Thread: Data files & flat files
- Next Thread: help on database modeling problem!


Linear Mode