Click here to Skip to main content
15,167,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
an example i have 10 columns in my table

5.,6.,7.,9. columns is null ,no any data (null columns variable)

i want get only

1,2,3,4,8,10 columns with my query

i hope i could explain

What I have tried:

i didnt find any answer

oracle get only not null columns - Google Search[^]
Updated 26-Aug-21 0:12am

1 solution

Sorry, but it sounds like bad database design.

If you want to get only those columns where any of record is NOT NULL, then you're in trouble. There's no simple way to achieve that, due to the fact that you'll need to create dynamic SQL statement based on content of table.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900