0

I'm looking for a way to drop single columns from an extended query in DBVisualizer. I have a couple of tables with more than one hundred columns each. Using a number of subqueries I want to drop a single column from one of the tables, something like that:

select *
from table1 a
join table2 b
on a.key = b.key
drop b.key;

I defenitely do not want to write down all the single columns, because the query is supposed to be used for a long time and the tables get new columns to often to change the query each time.

Is there a way to do this?

Thanks Felix

David דודו Markovitz
  • 42,900
  • 6
  • 64
  • 88
  • **(1)** Please add a tag with the relevant database (MySQL / Oracle / SQL Server / PostgreSQL etc.) + version **(2)** Do you mean that you want to delete rows from table2 that have a match in table1? – David דודו Markovitz Mar 05 '17 at 22:00
  • https://stackoverflow.com/q/24557317/330315 –  Mar 05 '17 at 23:17
  • http://stackoverflow.com/q/729197/330315 –  Mar 05 '17 at 23:18
  • http://stackoverflow.com/q/42518052/330315 –  Mar 05 '17 at 23:19
  • @DuduMarkovitz I truly want to delete columns as explained (not coded). I had more tags, no idea where they were lost. – Felix Springer Mar 06 '17 at 19:53
  • Still not clear, please add a data sample including required results. I've removed the irrelevant tags. dbvisualizer is a query tool and it is not relevant to your question. – David דודו Markovitz Mar 06 '17 at 19:56
  • DBVisualizer is the tool that I am using. So I guessed it could be relevant. The column key is a primary key of table b and it is contained in both tables. In fact the table I get will be joined with a couple of further tables and I want the user to be able to select the columns he needs with the ${...}$-parameter-option in dbvisualizer. However this doesn't work for columns that are in more than one of the tables used. – Felix Springer Mar 06 '17 at 20:14

0 Answers0