Solved

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

Posted on 2012-04-03
2
255 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Node.js 11 72
MySQL - Adding an incremented value to a duplicate string 30 46
SSL unsecure page mystery 17 39
Testing a list of Emails for validity 4 30
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

738 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