Solved

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

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult 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.
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 count occurrences of each item in an array.

792 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