Sql

Asked • 05/04/19

MySQL SELECT only not null values?

Is it possible to do a select statement that takes only NOT NULL values? Right now I am using this: SELECT * FROM table And then I have to filter out the null values with a php loop. Is there a way to do: SELECT * (that are NOT NULL) FROM table ? Right now when I select * I get val1,val2,val3,null,val4,val5,null,null etc.... but I just want to get the values that are not null in my result. Is this possible without filtering with a loop?

1 Expert Answer

By:

Larry C. answered • 05/05/19

Tutor
4.9 (294)

Computer Science and Mathematics professional

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.