About 14,500 results
Open links in new tab
  1. sql - MySQL SELECT only not null values - Stack Overflow

    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 …

  2. MySQL: selecting rows where a column is null - Stack Overflow

    Aug 21, 2010 · I'm having a problem where when I try to select the rows that have a NULL for a certain column, it returns an empty set. However, when I look at the table in phpMyAdmin, it …

  3. sql - MySQL select where column is not empty - Stack Overflow

    In MySQL, can I select columns only where something exists? For example, I have the following query: select phone, phone2 from jewishyellow.users where phone like '813%' and phone2 I'm …

  4. MySQL IF NOT NULL, then display 1, else display 0

    Feb 22, 2012 · What I've attempted so far: SELECT c.name, COALESCE(a.addressid,0) AS addressexists FROM customers c LEFT JOIN addresses a ON c.customerid = a.customerid …

  5. mysql - How to select only columns with not null values sql - Stack ...

    Oct 24, 2018 · The result of a SELECT query is a table, and has to have the same number of columns in every row. What do you expect the result to be if there are different numbers of non …

  6. select - MySQL IFNULL ELSE - Stack Overflow

    Use COALESCE: SELECT COALESCE(field_a, field_b) COALESCE is an ANSI standard function that returns the first non-null value from the list of columns specified, processing the …

  7. mysql - GROUP BY - do not group NULL - Stack Overflow

    GROUP BY is working as expected, but my question is: Is it possible to have a group by ignoring the NULL field. So that it does not group NULLs together because I still need all the rows …

  8. sql - MySQL SELECT x FROM a WHERE NOT IN ( SELECT x FROM b ...

    Jun 16, 2009 · From documentation: To comply with the SQL standard, IN returns NULL not only if the expression on the left hand side is NULL, but also if no match is found in the list and one …

  9. mysql - Using IS NULL or IS NOT NULL on join conditions - Theory ...

    SELECT * FROM shipments s LEFT OUTER JOIN returns r ON s.id = r.id WHERE s.day >= CURDATE() - INTERVAL 10 DAY AND r.id is null Why is this the case? All other filter …

  10. sql - WHERE all IS NOT NULL - Stack Overflow

    It depend on what you mean exactly by "everything that is not null": all columns must not be null select * from schedule where col1 is not null AND col2 is not null AND .. at least one column …