I am using Magento 2.2.6. My site is working fine. But today morning I show customer_grid_flat
table delete in my database.
Please, someone, let me know why it's doing.
Also in Admin side customer page display SQL error
You need to export this table from any other Magento of the same version. Then import it into your Magento's database.
After doing so, you need to truncate the table and then do the reindex by using the following command:
php bin/magento indexer:reindex customer_grid
Update: There is no need to import the table manually. When we reindex using the above command, Magento auto creates the table and refills the data.
Please let me know if it helps.