Solved

MySQL : How to only select certain data from the table?

Posted on 2012-04-03
2
256 Views
Last Modified: 2012-04-03
Hie All,

How do I only select a certain results from the table using MySQL queries?

Eg: I have a table below.

+-----------+
| data |
+-----------+
|      BM |
|      BI  |
|      MM |
|      SJ  |
|      GE |
|      PJ  |
+-----------+

How do I only select all the data except 'PJ' ?

Thanks.
0
Comment
Question by:bosscat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 17

Accepted Solution

by:
sonawanekiran earned 400 total points
ID: 37800098
Try like this
SELECT * from your_table_name where  data != "PJ"
0
 
LVL 1

Author Comment

by:bosscat
ID: 37800116
Awesome! it works. thanks alot and the prompt response.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question