Your question ranges from vague to incomprehensible.
You seem to think that joins make a query result really complicated. They don't. The result of a query with a join subclause is just a regular SQL table. So getting info on the columns is going to work the same way it does without joins.
If you're asking, "can I ask the DBMS what the schema looks like before I build a dynamic query," the answer is "depends on the DBMS you're using." DBI is, like ODBC, JDBC, ADO and on and on, pretty much a wrapper around SQL. Operations like interrogating the schema of the database are usually handled by proprietary SQL. You might search your DBMS manual for INFORMATION_SCHEMA.
If you're trying to figure out what the "schema" of your result is, then, again, it depends on your DBMS but there are a slew of functions in DBI. Read The Fine Manual on DBI, meaning "man DBI" or go to
http://dbi.perl.org/.