In case anyone was looking for the full process to remove a Credit Memo via SQL.
First remove the credit memo records:
delete from sales_creditmemo where increment_id = <CREDITMEMO_INCREMENT_ID>;
delete from sales_creditmemo_grid where increment_id = <CREDITMEMO_INCREMENT_ID>;
Update the order values:
UPDATE sales_order
SET state = 'complete',
status = 'complete',
base_discount_refunded = NULL,
discount_refunded = NULL,
discount_tax_compensation_refunded = NULL,
base_discount_tax_compensation_refunded = NULL,
base_shipping_tax_refunded = NULL,
shipping_tax_refunded = NULL,
shipping_refunded = NULL,
base_tax_refunded = NULL,
tax_refunded = NULL,
base_subtotal_refunded = NULL,
subtotal_refunded = NULL,
base_total_offline_refunded = NULL,
base_total_refunded = NULL,
total_offline_refunded = NULL,
total_refunded = NULL,
base_shipping_refunded = NULL,
base_total_online_refunded = NULL,
total_online_refunded = NULL
WHERE increment_id = <ORDER_INCREMENT_ID>;
Update the order line values:
UPDATE sales_order_item
SET qty_refunded = 0.0000,
amount_refunded = 0.0000,
base_amount_refunded = 0.0000,
discount_tax_compensation_refunded = NULL,
base_discount_tax_compensation_refunded = NULL,
tax_refunded = NULL,
base_tax_refunded = NULL,
discount_refunded = NULL,
base_discount_refunded = NULL
WHERE order_id = <ORDER_ID> --note this is the value seen in the URL when viewing the order
Remove Order Comment:
--find the comments for the order
select * from sales_order_status_history where parent_id = <ORDER_ID>
--remove the one referencing the credit
delete from sales_order_status_history where parent_id = <ORDER_ID> and entity_id = <COMMENT_ID>
Running the above queries with the correct order references left the order look like it did before the Credit Memo was created.