You can manage it like below:
Magento 2 database contains a table name 'sales_sequence_profile' which has prefix column and every row contains a meta_id which relates with table 'sales_sequence_meta'.
Table 'sales_sequence_meta' sequence table names according to stores and type(order, invoice, shipment, creditmemo, rma).
- sequence_order_* contains the last inserted order ids
- sequence_shipment_* contains the last inserted shipment ids
- sequence_invoice_* contains the last inserted invoice ids
- sequence_creditmemo_* contains the last inserted creditmemo ids
- sequence_rma_item_* contains the last inserted rma item ids
Basically this is just for understanding. You need to update the table 'sales_sequence_profile' and related sequence tables.