add get table prefix to query