Error while dumping core backup

Hi while running dump query "cockroach dump mytestdb --insecure < back.sql " i am getting error “Error: pq: syntax error at or near “from”
Failed running “dump””

The error is because you are trying to back a table up that has zero columns. cockroach dump is trying to do select ... from yourtable but there is no column between select and from.

This is a known bug https://github.com/cockroachdb/cockroach/issues/37768

The workaround is to either skip that table during the dump, remove the table or add a columnn to it.