How to get table name with prefix in Magento 2?

Many times Magento 2 tablename have prefix value for each table.
We can get table name prefix with below way in Magento 2.

Using below code snippet you can get table with prefix code always,

public function __construct(
    \Magento\Framework\App\ResourceConnection $resource
) {
    $this->resource = $resource;

public function customHandler()
	/* Create Connection */
    $connection  = $this->resource->getConnection();
    $tableName   = $connection->getTableName('sales_order'); // return "prefix_sales_order"

    /* Run row query */
    $query = "SQL Query";

In above function your table will get prefix value with table name.
If your table has prefix as mage_ then your table value will get like, mage_sales_order