Free Advertising - Debt Help - Adverse Credit Remortgage - Advertising - Personal Loans

PDA

View Full Version : Query Help - Selecting rows that have data in column


Jakobi
May 5th 2007, 4:09 pm
Hello,

How do I query the rows that have data in a certain column only?

I have 5 columns

ID, Files, Daily, Monthly, Yearly

I want to only query the rows that have data in column Monthly.

SELECT * FROM `files` ORDER BY `files` DESC LIMIT 9"

This shows me all of them but I want only whens that have a data in column monthly. I am not sure of the proper syntax to do so.

Any insight would be great.

SoKickIt
May 5th 2007, 4:27 pm
SELECT * FROM `files` WHERE Monthly IS NOT NULL ORDER BY `files` DESC LIMIT 9

or

SELECT * FROM `files` WHERE Monthly <> '' ORDER BY `files` DESC LIMIT 9

Jakobi
May 5th 2007, 5:08 pm
Thank you.