How to check NULL Values from MYSQL database column

2 vues (au cours des 30 derniers jours)
Raj Tailor
Raj Tailor le 16 Mai 2019
Modifié(e) : Piyush Kumar le 21 Oct 2024
Hello all,
I want to implement below statement of Mysql database in matlab to detect null values of column.
Mysql query:
SELECT * FROM table_name WHERE column IS NULL
Can anybody help me with this? how can I implement the same in Matlab?
Regards,
Raj
  2 commentaires
TADA
TADA le 16 Mai 2019
do you mean to fetch data from mysql database?
Raj Tailor
Raj Tailor le 16 Mai 2019
Hello TADA,
I want to query the data from the database which has NULL values (no value/empty) in column.

Connectez-vous pour commenter.

Réponses (1)

Piyush Kumar
Piyush Kumar le 21 Oct 2024
Modifié(e) : Piyush Kumar le 21 Oct 2024
Hi,
To fetch those rows from a database where a column is empty or null in SQL, you can use COALESCE(column, ”) or column IS NULL OR column = ”. These queries fetch rows where the specified column contains an empty string or null value.
To execute this query in MATLAB,
  • Use the database function to establish a connection to the database
  • Use the fetch function to import data into MATLAB workspace from the execution of SQL statement

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by