How to Select Distinct Data from Table in MySQL or MariaDB
When you use distinct keyword in Select, it returns you distinct (different) values. Below is the syntax you will use to get distinct values from MySQL Table.
Select distinct column1,column2,... from YourTableName;
Example :
Let's create customer table and then insert some rows in customer table.
CREATE TABLE `customer` (
`idcustomer` int,
`firstname` varchar(50) NULL,
`lastname` varchar(30) NULL,
`age` int(11) DEFAULT NULL,
`phonenumber` char(11) DEFAULT NULL,
`dob` date DEFAULT NULL,
`gender` char(1) NOT NULL
) ;
insert some values in table.
insert into customer(idcustomer,firstname,lastname,age,phonenumber,dob,gender)
values
(1,'Aamir','Ali',39,'505-4141969','1980-01-01','M'),
(2,'Aamir','Naz',39,'505-4141969','1980-01-01','M'),
(3,'Aamir','Shahzad',39,'505-4141900','1980-01-01','M');
Now let's say if you want to get the distinct or different values from first name column, you can run below statement.
Select distinct firstname from customer;
The above query will return you only "Aamir".
Now let's say if you want to get distinct values for firstname and phonenumber, then you will get two values.
Select distinct firstname,phonenumber from customer;
Let's create customer table and then insert some rows in customer table.
CREATE TABLE `customer` (
`idcustomer` int,
`firstname` varchar(50) NULL,
`lastname` varchar(30) NULL,
`age` int(11) DEFAULT NULL,
`phonenumber` char(11) DEFAULT NULL,
`dob` date DEFAULT NULL,
`gender` char(1) NOT NULL
) ;
insert some values in table.
insert into customer(idcustomer,firstname,lastname,age,phonenumber,dob,gender)
values
(1,'Aamir','Ali',39,'505-4141969','1980-01-01','M'),
(2,'Aamir','Naz',39,'505-4141969','1980-01-01','M'),
(3,'Aamir','Shahzad',39,'505-4141900','1980-01-01','M');
Now let's say if you want to get the distinct or different values from first name column, you can run below statement.
Select distinct firstname from customer;
The above query will return you only "Aamir".
Now let's say if you want to get distinct values for firstname and phonenumber, then you will get two values.
Select distinct firstname,phonenumber from customer;
Computerized help has prepared it exaggeratedly. Would you be able to answer how it wound up conceivable? data science course in pune
ReplyDelete
ReplyDeleteSuch a very useful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. I would like to state about something which creates curiosity in knowing more about it. It is a part of our daily routine life which we usually don`t notice in all the things which turns the dreams in to real experiences. Back from the ages, we have been growing and world is evolving at a pace lying on the shoulder of technology. data science course will be a great piece added to the term technology. Cheer for more ideas & innovation which are part of evolution.
You completed certain reliable points there. I did a search on the subject and found nearly all persons will agree with your blog.
ReplyDeleteData Analytics Course in Mumbai
Thanks for the informative and helpful post, obviously in your blog everything is good..
ReplyDeleteExcelR Data Analytics courses
This is my first visit to your web journal! We are a group of volunteers and new activities in the same specialty. Website gave us helpful data to work. Admond Lee
ReplyDeleteWe have sell some products of different custom boxes.it is very useful and very low price please visits this site thanks and please share this post with your friends. Admond Lee
ReplyDeleteWhen students help in online search they find the cost of essay writing very high. But at allassignmenthelp.com, we provide the best quality essays from students at low charge.
ReplyDeletebest online essay writers
professional college essay writers
Get best online Assignment help from top rated assignment help expert. We have 10+ years of experience in the field of assignment help. NZ Assignment Help are providing all the assignment help services for all college and university students. Our Assignment helpers NZ are giving on-time delivery guarantee with 100% plagiarism free content for all the assignment help.
ReplyDeleteYou there, this is really good post here. Thanks for taking the time to post such valuable information. Quality content is what always gets the visitors coming. analysis report
ReplyDeleteSingapore essay writing service are giving you headaches? If you are worried because of your assignment work and submit on time, then you have to select Singapore Assignment Help Writing Services from us and you can easily overcome such situations.
ReplyDeleteI know that it's not exactly your topic but I have a question. what is questionnaire writing? I need to complete this task. I look for some valuable ideas.
ReplyDeleteThanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts. If you're looking for CDR Report Help. You can email us at cs@needcdrreport.com or Phone Number: +61-2-8005-8227
ReplyDeleteYou completed certain reliable points there. I did a search on the subject and found nearly all persons will agree with your blog.
ReplyDeleteExcelR Courses in Business Analytics
My friend advised me to pay for literature review. I am studying at college. We are always assignd different tasks. On of th recent is to write a literature review. I do not hav tim for writing that is why I would better buy it.
ReplyDeleteThe information provided on the site is informative. Looking forward more such blogs. Thanks for sharing .
ReplyDeleteArtificial Inteligence course in Nashik
AI Course in Nashik
When you want to buy discussion board post service it is important to appeal to reputable academic service company that offers a full range of assistance, including discussion board posts that are often an important component of your grade.
ReplyDeleteThank you for sharing such a golden information will be your regular visitor. GIS (Geographical Information System) are basically systems of computers that are designed to collect, analyze, manage and share geographical and spatial data. Remarkably, almost all environmental applications today utilize GIS. In other words, GIS has gained wide applications in both research, management of wildlife, tracking specific species, informing agricultural practices among a tone of other different uses. Visit on GIS Assignment Help for more
ReplyDelete
ReplyDeleteIf you ever locked in a situation where you left the key in the door? If yes then give a call to Emergency LockSmith Near Me. We are available 24/7.
ReplyDeleteThe blog post is worth reading and I would like to appreciate your efforts for making us familiar with the features of purpose of narrative writing
We can all make a consensus to the fact that law courses are more tedious and time consuming than most of the other academic courses. Courses get even more difficult when the students are tasked assignments on diverse specializations of law. In case you are required to prepare a corporate law assignment when you still cannot understand the administrative law, you do not have any other option but to make use of the Corporate Law Assignment Help assistance from the experts.
ReplyDeleteCorporate Law essay assignment
Corporate law assignment help
Corporate governance expert
Corporate governance essay
Corporate law thesis
Corporate governance dissertation
A great piece of writing! You have an efficient flair for high quality writing. I am highly impressed by your way of writing this content beyond words. I really have a lot of appreciation for your writing.
ReplyDeleteSAP training in Kolkata
SAP course in kolkata
SAP training institute in Kolkata
You can take pride in the way you write such brilliant articles. It is reflected in the pattern of writing when a writer does the required homework to write quality material. Thank you so much for sharing this magnificent content.
ReplyDeleteSAP training in Mumbai
SAP course in Mumbai
SAP training institute Mumbai
ReplyDeleteUse your printer smoothly with our Wireless Printer Offline services. We are there to solve all your issues quickly and instantly all the 24/7.
I have bookmarked your site for future reference. Good work. Most of the students come up to us for capsim homework help and always return satisfied. Our main purpose is to help you gain the best grades through your paper. We don’t have any concern with the reason behind asking for help; our main aim is delivering you the best capsim homework help. Captive simulation is named as capsim that is basically designed to teach students the different functional elements and the linking of decision and operational results. Moreover, it also develops the strong skills and commitments in the students to ensure academic and professional life success. Go ahead and reach out to us for Capsim simulation Help
ReplyDeleteYour blog is really awesome and I really enjoyed it. Students cannot graduate before submitting a high-quality capstone project. It is a basic requirement in all higher learning institutions that every student must embark on extensive research on a particular subject matter and present his or her findings in a professional way. Nursing students must write and present their standard capstone projects that will show their commitment to their academic achievements and their readiness to work in the public health sector. Reach out for Nursing Capstone Writers
ReplyDeleteIt seems that such elementary things: balance, decency, and attentiveness. But with the existing characteristics of one or another, the person around you leads to the setting of circumstances or a positive mood. Life is filled with joy, happiness as well, the nuance of how you will apply for services order dissertation online. I turned for advice in despair that I will not have time to cope and I really received qualified help.
ReplyDeleteThank you for this wonderful information share and excellent information providing by your article. Are you looking for assignment help services in Singapore? Do you require to finish your assignment? Perdisco Assignment Help is a well-liked assignment Acquire immediate Assignment Help before completion of time at a fair cost. Kindly visit the NeedAssignmenthelp website for more info.
ReplyDeleteAlthough some of the views expressed were extremely negative regarding American students I strongly beleive that American students should not only treat international students well and respectfully but also any other foreign visitor irregardless of ones place of origin.assignment expert
ReplyDeleteĐặt vé máy bay tại Aivivu, tham khảo
ReplyDeletevé máy bay đi Mỹ bao nhiêu
chuyến bay từ mỹ về vn
vé máy bay phú quốc về sài gòn
vé máy bay đi hà nội hôm nay
vé máy bay từ vinh đi nha trang
thuê xe 7 chỗ đi sân bay nội bài
combo resort đà lạt
research paper writing help of any style: APA, MLA, etc. 24/7 Support, Full Confidentiality and 100% Plagiarism Free
ReplyDelete
ReplyDeleteVery Good Blog thanks for sharing.
Mahindra jayo Price
This comment has been removed by the author.
ReplyDeleteHey, Thanks for sharing this informative content with us.
ReplyDeleteMahindra Jeeto Price
This blog is very useful and informative.
ReplyDeleteMahindra Maxi
i appreciate your quality stuff, that was really so useful and informative blog!
ReplyDeleteVolvo Truck
Hey, Its Nice Blog thanks for sharing this with us
ReplyDeleteMahindra Yuvo
These tips are very useful for developers, especially for those who have knowledge about MySQL. They can improve their skills and earn a lot of money. Coursework writing services.
ReplyDeleteAce Starlit Sector 152 Noida is an upcoming new residential project by ACE Group, Noida.ACE Starlit Noida Expressway presents 2/3 BHK luxury apartments which are innovatively planned dazzling an architectural splendor.If you have any queries please Visit our site:- Ace Starlit
ReplyDeleteYou have received the proper place! you'll find the simplest custom boxes with logo here at custom boxes wholesale. we all know your desires for the merchandise of your packaging.
ReplyDeleteLooking for somebody to deliver the Nursing assignment help? Visit our platform for getting top-quality writing services. Our Ph.D. level professionals deliver top-notch projects within your desired time. Browse our website for knowing more details about the services.
ReplyDeleteMost students look for help with their assignments online. This is because of the great overload they have when studying. They have to complete assignments and sit for exams at the same time. Top Academic Writers are well aware of the tension and anxiety that comes with preparing for exams yet you have assignments to handle. You will always be chasing deadlines which makes you lack time to even enjoy the things you like doing. Read more on Academic Writers
ReplyDeleteCanon Pixma MG 2522 is an all-in-one inkjet printer equipped with multifunctional features like printer, scanner, and copier.
ReplyDeleteCanon.com/ijsetup/mg2522 |
Canon.com/ijsetup mg2522
| microsoft365.com/setup
The information shared is really helpful to get to know about various facts and the information shared is rich in content. Looking forward to more informative blogs. absu cut off mark for business administration
ReplyDeletevisit your web page. It is really useful and easy to understand. Hope everyone get benefit. Thanks for sharing your Knowledge and experience with us. coffee beans australia
ReplyDeletevisit your web page. It is really useful and easy to understand. Hope everyone get benefit. Thanks for sharing your Knowledge and experience with us. coffee roasters sydney
ReplyDeleteQuickwitters is the leading assignment help provider in the world. We have the most professional assignment writers from Canada for all your academic needs. Our writers have been drawn from various universities of Canada.
ReplyDeleteonline assignment help Canada
The information you provided is very useful, thank you very much for sharing useful information with us. You can check the Azerbaijan visa requirement online. You can apply for a visa & pay Azerbaijan visa fee in just 5 minutes.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteVery excellently written and perfect article, I found it extremely enlightening and informative. Thanks for sharing. is EkoUNIMED post utme form still on sale
ReplyDeleteBeing a software engineer and SEO Expert currently living in the United States. My interests range from writing technology blogs to entrepreneurship. I am also interested in web development and programming.
ReplyDeletewww.office.com/setup
www.office.com/setup
www.office.com/setup
www.office.com/setup
It is a very informative article.Thankyou so much .Now You can easily apply to the Ukraine tourist visa express application system which takes just 5 minutes to apply and within 30 minutes you can get your e visa on your Email.
ReplyDeleteA canon pixma tr4520 setup and printer will most likely make your life more straightforward yet it may require a long time to comprehend it totally. Assuming you have purchased a Canon Pixma Tr4520 arrangement then you should set it up at first before you can begin with the printing system.
ReplyDeleteOur Cardiac Nursing Online Assignment assistance experts have obtained a higher Degree and are experienced medical professionals who can aid students with writing assignments on these and other subjects. Cardiac Nursing Assignment Help creates assignments by completing extensive study and applying effective strategies. Cardiac Nursing Assignment Help
ReplyDeleteThank You For Sharing Such A Nice Blog.
ReplyDeleteij.start.canon ts3122 | ij.start.canon | 123.hp.com/laserjet | 123.hp.com/laserjet | hp officejet pro 8600 driver
This is an incredible blog post, thanks for sharing this article. I am truly motivated by you for blogging. free ielts nigeria past questions pdf
ReplyDeletet is really useful and easy to understand. Hope everyone get benefit. Thanks for sharing your Knowledge and experience with us. Doodle Puppies
ReplyDeleteHire the experts of British Dissertation help for outstanding Essay Writing Service . From providing customised solutions to choosing the topic to creating plagiarism-free work, our experts are capable of doing anything. Irrespective of the level and complexity of the task, our experts can help you overcome any hurdle and complete it on time.
ReplyDeleteQuick, quality and efficient proofreading service connect clients with an international audience. Acadecraft channels the content that appeals to bulk viewers' attention sitting in different parts of the globe. Native Proofreaders at Acadecraft have years of experience in delivering optimal proofreading solutions. The platform has expertise in proofreading technical, business, and academic content of any language.reliable fact checking serviceProfessional Abstract Writing Services
ReplyDeleteThis comment has been removed by the author.
ReplyDeletevery informative and it has helped me a lot And what promotes my business visit our site: Toronto Boat Rentals
ReplyDeletethe most vital info for me.And i’m glad reading your article. But want to remark on some general things, The web site style is great, the articles is really nice Home Support
ReplyDeleteenjoyed reading your article. I found this as an informative and interesting post, so i think it is very useful and knowledgeable news
ReplyDeleteYour article is well written and simple to understand.You make excellent points.Thank you for sharing amazing blog.Nice.....
ReplyDeleteI am grateful to this blog for providing unique and helpful knowledge on this topic. Visit us for Getting free directory submission site list India. Thank You!
ReplyDeleteWe are a group of skilled and enthusiastic developers, designers, and technical experts who have worked together to provide comprehensive support to our prestigious customers. We provide our customers with a complete interior, digital, and branding solution.
ReplyDeleteHere our services laser cutting services in Gurugram, CNC laser cutting services in Gurugram, MDF jali cutting service in Gurugram, Jali cutting service in Gurugram etc.
always easy if you’ve ever had a dog. It can be downright frustrating.Dogs articles However, if you’re really willing to put in the time and effort, you’ll be able to have a pet who listens to every command with ease.
ReplyDeleteAssignment helper are instrumental in supporting students' educational success. They offer guidance and aid in tackling coursework, research, and homework assignments. By providing valuable insights, these helpers empower students to grasp challenging subjects and improve their academic performance. Their expertise is a valuable resource for those seeking academic excellence.
ReplyDeleteAs an experienced management teacher and provider of assignment help services in the UK, I find this blog title intriguing. While focusing on MySQL or MariaDB queries, it's crucial to highlight the significance of efficient data management in contemporary business settings. Exploring techniques to select distinct data aligns with the core principles of management, emphasizing clarity and precision in decision-making. Incorporating management assignment help services could enrich the discussion, offering practical insights to students navigating database management challenges.
ReplyDeleteinformative Rent Light Private Jets
ReplyDeleteRent Very Light Jets
As an assignment expert with years of experience, I highly recommend taking the time to understand Java fundamentals thoroughly. Whether it’s handling arrays or mastering object-oriented programming, a strong foundation is key to solving most Java assignments. If you're feeling lost or overwhelmed, don’t hesitate to seek java assignment help
ReplyDeleteExpert assistance can clarify concepts, provide valuable insights, and guide you through complicated tasks. Practice regularly, and try to apply what you learn in real coding projects. With persistence and expert support, you’ll improve your Java skills and ace your assignments in no time.
Understanding the prerequisites of a philosophy assignment is one of the first steps toward mastering it. Read the directions carefully to determine crucial terms, topics, and the fundamental question. Philosophy essays often demand you produce well-thought-out arguments supported by evidence from philosophical sources. If you're suffering with this, getting philosophy assignment help can be a game-changer. Professional assistance clarifies hard themes, guides you through essay structure, and ensures your arguments are logical and appealing. Completing philosophy assignments successfully takes commitment, critical thought, and efficient use of the resources at hand. You can overcome challenges and generate outstanding work by heeding professional advice and utilizing resources like Philosophy Assignment Help and my assignment help.
ReplyDeleteIndian students, especially, are partial to the PTE exam because it is easy and quick. In contrast to other English tests, PTE offers results immediately within 48 hours enabling students to plan their next steps without unnecessary delays. It is used by thousands of universities, colleges, and governmental bodies around the world, which has added to its popularity. Knowing what you need to know about the PTE exam booking will be the foundation that leads to your success in taking this exam.
ReplyDelete