1

In want to export MySQL table which contains 1M+ records, now I want to figured out those records which is having NULL values and also export those values only which satisfy my criteria.

Is this possible, with PHP script or from MySQL console or whatever?

luchaninov
  • 6,792
  • 6
  • 60
  • 75
SagarPPanchal
  • 9,839
  • 6
  • 34
  • 62

2 Answers2

1

You can use mysqldump to do it. It allows you to specify databaee and table and the --where parameter allows you to specify a where-clause.

See https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html

Michael Legart
  • 800
  • 4
  • 7
1

You can use MYSQL workbench to export the record

1) for Null value record only

select * from tablename where col is null

2) your criteria

select * from tablename where your <criteria logic>

You can export this result set from workbench to csv or excel

You can also use TOAD for MYSQL

refer How to export table data in MySql Workbench to csv?

Community
  • 1
  • 1
Ronak Shah
  • 1,539
  • 2
  • 13
  • 20