PROCESSING, PLEASE WAIT
This website uses cookies to grant a better experience for visitors. By browsing, you acknowledge that you read and accept Terms of Use, Privacy and Cookie Policy.
Change Edition (Content might be different) :
MENU SEARCH
Home \ Solutions \ Solution Center \ Database \ SQL

How to get duplicate values as single records from database with sql?

Posted On : Aug 20, 2020
Last Update : Aug 20, 2020

There might be lots of duplicate values or records in databases. Any duplicate values in table columns or complete duplicate records can be listed as single (unique) values or records with DISTINCT command of SQL.

/* List all records from Shoes table. */
SELECT * FROM Shoes

/* List all different (unique) records from Shoes table. */
SELECT DISTINCT * FROM Shoes

Shoes
IDModelColorSizeStock
1AdidasWhite36100
2NikeWhite4166
3KinetixDark Blue3897
4PumaBlack3994
5New BalanceOrange4182
6PumaRed4069
7AdidasDark Blue3419
8AdidasRed4015

/* List all different Models from Shoes table. */
SELECT DISTINCT Model FROM Shoes

Shoes
Model
Adidas
Nike
Kinetix
Puma
New Balance

/* List all different Colors from Shoes table. */
SELECT DISTINCT Color FROM Shoes

Shoes
Color
White
Dark Blue
Black
Orange
Red

2,188
9 (0 %)
This may be the post also your loved ones are looking for a long time. Share and inform them.
COMMENTS 0
No comment made yet. Make first via below form.

WRITE COMMENT

Do you have any comments, additional informations or corrections? Right here, write now!
Name
Avatar
Change
Restore DefaultClose (X)

E-Mail (Will not publish, you’ll get notification when your comment is published or replied.)
Website (Optional)
Comment
Your profile will be stored for this browser automatically.
QUICK LINKS


HIGHLIGHTS

LATEST POSTS
MOST LIKED
MOST COMMENTED
NEWS
REVIEWS
DIGITAL MARKETING
DESIGN

HTML
CSS
PHOTOSHOP
PROGRAMMING

C#
JAVASCRIPT/JQUERY
.NET MVC
SQL
FLIGHT SIMULATOR

FLIGHT SIMULATOR X (FSX)
FLIGHT SIMULATOR 2020
NOTES FROM LIFE

FOOTBALL
TRAVEL
SOLUTION CENTER

ALL SOLUTIONS
DESIGN
PROGRAMMING
DATABASE
HARDWARE
MS WINDOWS
MS OFFICE
WEB
DIGITAL MARKETING
INFO

ABOUT ME
CONTACT


Kaan Çamur HELLO, THIS IS KAAN ÇAMUR. I’VE SOME SKILLS ON COMPUTERS AND DIGITAL TECHNOLOGIES. I CREATED MY THIS DIGITAL HOME TO SHARE ALL MY EXPERIENCES WITH YOU. I BELIEVE YOU’LL FIND USEFUL CONTENTS HERE THAT WILL MAKE YOU HAPPY. IF YOU BE HAPPY, I WILL ALSO BE HAPPY. SO, LET ME KNOW YOU’RE HAPPY. :-)
WANT TO BE INFORMED WHEN THE NEW POST HAS ARRIVED?
E-MAIL  :  
OR FOLLOW

Copyright © 2024 Kaan Çamur. All rights reserved.

All materials and posts in this website are protected by copyright laws.

TERMS OF USEPRIVACYCOOKIE POLICYCONTACT