I am doing some raw sql opertaions and would like to know if there is a way to get programmatically the Prefix used for the tables (the prefix you set during the Magento installation)?
Magento 2.0 – Programmatically Get the Prefix Used for Tables
magento-2.0magento2prefix
Best Answer
You can get the prefix by using the function
getTableName()
like below : Always usegetTableName
with raw queries to fetch the table along with the prefix dynamicallyYou can also get the prefix from the file
app/etc/env.php