Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6360967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:42:58+00:00 2026-05-24T23:42:58+00:00

I am looking for missing data in a data migration project, and this report

  • 0

I am looking for missing data in a data migration project, and this report will help me immensely.

Given a MySQL table, I would like to count all the empty (NULL or ”) values in each row of that table. The output would be a list of column names and a count of empty or non-empty rows for each column. This data is something I would manually compare to the source tables – manually because I expect few counts to match up exactly and column names are completely different between the source and imported tables.

I have about 30 tables to check, a few with 100 columns. I have direct MySQL access from my PC, but no access to run any scripts on the server with the database.

Example for TableA

Col1 Col2 Col3
'XX' NULL 'XX'
'XX' NULL ''
'XX' 'XX' 'XX'
'XX' ''   'XX'

The report I would want is (for non-empty counts with ” counted as empty):

Col1: 4
Col2: 1
Col3: 3
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:42:59+00:00Added an answer on May 24, 2026 at 11:42 pm

    You can use the following query for each table

    SELECT COUNT(*), COUNT(col1) as col1, COUNT(col2) as col2
    FROM TABLE1
    

    For getting all columns for a specific table you should run query

     select column_name from information_schema.columns where TABLE_NAME='TABLE1';
    

    Results of this query you can use for auto generation queries like the first one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking to do a very small, quick 'n dirty side project. I like the
I've written a procedure to dump table data out to a text file like
I am looking for different ways to present data in gridview that has like
Ok, maybe I'm missing something here but I'm looking at various PHP hosting options
Looking for a Linux application (or Firefox extension) that will allow me to scrape
Looking at the C# project templates in VS2008 and the offerings are WPF User
I have successfully completed a multiple imputation on the missing data of my questionnaire
So in looking through Core Data Snippets , I found the following code: ...
I'm looking to compare two sets and display the missing elements in second set
I am looking up methods of the System.Data.Objects.DataClasses.StructuralObject in Reflector and I see that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.